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
질문됨 3년 전578회 조회
1개 답변
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
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인