无法浏览到我的 EC2 实例 [英] Can't browse to my EC2 Instance

查看:33
本文介绍了无法浏览到我的 EC2 实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚(大约 1 小时前)将一个弹性 IP 关联到我在 Amazon EC2 上的实例.如果我通过 SSH 连接到我的实例并输入 lynx localhost 我可以看到 apache 响应,因为我看到了 It works 页面.

I've just (about 1 hour ago) associated an Elastic IP to my instance at Amazon EC2. If I SSH into my instance and type lynx localhost I can see that apache is responsive because I see the It works page.

但是,如果我浏览到我的实例(通过 IP 本身通过亚马逊为我创建的公共 DNS),我会糟糕!Google Chrome 无法连接到... bla bla...

However, If I browse into my instance (both via the IP itself and via the public DNS Amazon has created for me), I get Oops! Google Chrome could not connect to.. bla bla...

我应该再等一段时间(以防是由于某些 DNS 问题)还是这是否表明出现问题?

Should I wait some more time (in case it's due to some DNS thing) or does this indicate something is wrong?

提前致谢

当我通过 ssh 进入我的实例时,我使用了完整的 IP 地址并且它可以工作......(我的意思是弹性 IP).

When I ssh into my instance, I use the full IP address and it works... (the Elastic IP I mean).

推荐答案

您必须配置防火墙以打开 HTTP 端口.

You must config the firewall to open the HTTP port.

更具体地说,对于 AWS,这是通过安全组完成的.您应该使用需要打开的端口创建一个.在大多数情况下,这是 TCP 的 80 端口.

To be more specific, for AWS this is done via Security Groups. You should create one with the ports you need opened. In most cases that's the por 80 for TCP.

您可以在文档中了解如何实现这一点http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html

这篇关于无法浏览到我的 EC2 实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆