简体   繁体   English

AWS EC2-浏览器无法连接到服务器

[英]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. 我试图将我的静态投资组合网址laurenleague.io指向AWS EC2,以便在那里建立一个站点。

I've followed a tutorial on setting AWS EC2 up and installing Apache on it. 我遵循了有关设置AWS EC2并在其上安装Apache的教程。 It seems like I've done everything right, including enabling HTTP on port 80 in the inbound rules of the security groups. 看来我做对了所有事情,包括在安全组的入站规则中在端口80上启用HTTP。 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. 我还可以ping公共dns,公共ip和我的新URL并获得响应。

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. 在我在AWS上的安全组中,它说端口80是开放的,并接受来自任何地方的流量。 But when I run nmap from my shell, it says port 80 is closed! 但是,当我从外壳程序运行nmap时,它说端口80已关闭! 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! 感谢@stdunbar,我登录到我的机器上,发现EC2上的Apache服务器已停止! I found this out by ssh-ing into it and running: 我通过将其插入并运行来发现了这一点:

sudo ps -efww | grep httpd

which returned nothing. 什么也没返回。 So I rebooted Apache with: 所以我用以下命令重启了Apache:

sudo service httpd start

And now it works! 现在就可以了!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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