简体   繁体   中英

AWS EC2 - browser can't connect to server

I'm trying to point my static portfolio url, laurenleague.io to AWS EC2 so I can build a site there.

I've followed a tutorial on setting AWS EC2 up and installing Apache on it. It seems like I've done everything right, including enabling HTTP on port 80 in the inbound rules of the security groups. I can ssh into the machine, so my key pair is fine. I can also ping the public dns, public ip, and my new url and get a response.

However, my browser can't connect to the server.

In my security groups on AWS, it says port 80 is open and accepting traffic from anywhere. But when I run nmap from my shell, it says port 80 is closed! Why??

Please help, this is driving me crazy.

GOT IT!

Thanks to @stdunbar, I logged into my machine and found out that Apache server on my EC2 had stopped! I found this out by ssh-ing into it and running:

sudo ps -efww | grep httpd

which returned nothing. So I rebooted Apache with:

sudo service httpd start

And now it works!

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