简体   繁体   中英

Apache Ubuntu Default Page not Loading

I am working on a new site, and I am spinning up a new server. I have ran into an issue I never have before. After installing LAMP on the server (Ubuntu 16.04), I am not receiving the default Apache Ubuntu page. I am getting this error:

13.59.41.148 took too long to respond.

I have started many servers with LAMP using Digital Ocean in the past, but this is my first time with AWS EC2. Could there possibly be something that I am missing that I have to do with this new host?

Amazon's AWS Solution

For those setting up on Amazon's AWS, ensure you are manually typing http:// instead of clicking the default link on their dashboard. I had a similar issue just after installing Apache on Ubuntu 20.

I solved the issue by manually typing the address in my browser and ensuring the address had http://[IP_Address] instead of clicking the default link that is given by Amazon AWS as that has https:// by default.

Ultimately, ensure your Security Groups allow http (Port 80) Incoming and Outgoing traffic.

Also, ensure you have assigned the Security Group to your running instance.

If you have not set up your SSL as yet the address will not open so ensure you have http:// instead of https:// when trying to open your default address.

Your instance has a public IP assigned already, the issue is the security groups.

Check the default group, you will have ssh port (22) open to 0.0.0.0/0 which means to the entire world as I was able to hit your instance over IP/22.

You can use nc utility to check connections[ IP port ]

nc -vz 13.59.41.148 22

To double check that Apache is loading the default page, you can always ssh to the server and curl localhost

curl localhost:80

Simply add network rule to the security group allowing 80 from 0.0.0.0/0 if you wish to have traffic opened to everyone.

However, better solution after the testing phase would be to setup Load Balancer in front of ec2 hosting the website. That Ec2 would be then hosted in private network, and traffic would be forwarded from Load Balancer hosted in public network.

You should probably also limit access over 22 to only your IP/network.

have a read on security groups basics: AWS docs - Security groups

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM