Lightsail Public IP and Distribution

0

Hello.
I have LightSail's instance running LAMP. The architecture looks like this....
Google Domain -> Route 53 -> LightSail Distribution -> LightSail Load Balancer -> Light Sail Instances.

All works....however, the problem is that google has managed to index the LightSail instance IP addresses so basically, anyone doing a google search can find the server IP. And also, google is indexing the LoadBalancer IP.

Is there a way to prevent this from happening? I don't want people to find out what the IP address is..thats why I put a Distribution and load balancer before.

Edited by: extjac1 on Nov 2, 2021 3:31 PM

extjac1
gefragt vor 3 Jahren579 Aufrufe
1 Antwort
0

cd /opt/bitnami/apache/conf/bitnami

#sudo nano bitnami.conf

<VirtualHost *:80>
ServerName <Your-lightsail-static-IP>
Redirect 403 /
ErrorDocument 403 "Sorry, direct IP access not allowed."
DocumentRoot /dev/null/
UseCanonicalName Off
</VirtualHost>

#sudo nano bitnami-ssl.conf

<VirtualHost *:443>

SSLCertificateFile "/opt/bitnami/apache/conf/bitnami/certs/server.crt" <----- modify the path to SSLCertificateFile for your instance
SSLCertificateKeyFile "/opt/bitnami/apache/conf/bitnami/certs/server.key" <----- modify the path to SSLCertificateKeyFile for your instance

ServerName <Your-lightsail-static-IP>
Redirect 403 /
ErrorDocument 403 "Sorry, direct IP access not allowed."
DocumentRoot /dev/null/
UseCanonicalName Off
</VirtualHost>

extjac1
beantwortet vor 3 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen