通过浏览器连接到亚马逊(AWS)的EC2实例 [英] Connect to Amazon (AWS) EC2 instance via browser

查看:1026
本文介绍了通过浏览器连接到亚马逊(AWS)的EC2实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有通过浏览器连接到亚马逊弹性云计算机实例的麻烦。 我试图去的 * 的**的 * 的**** .compute-1.amazonaws.com,但浏览器返回的连接有超时。

I am having trouble connecting to an Amazon Elastic Cloud Computer Instance via a browser. I attempted going to ********.compute-1.amazonaws.com , but the browser returns that the connection has timed out.

我可以通过ssh和WinSCP的连接。这就是我如何上传一个web应用程序我开发。我还创建了一个安全组并添加规则,以打开端口22和80。

I can connect via ssh and winscp. That is how I uploaded a web app I developer. I have also created a security group and added rules to open ports 22 and 80.

我一定要安全组分配给莫名其妙的实例?

Do I have to assign the security group to the instance somehow?

安全组的规则还没有一个源IP,以及他们做的0.0.0.0/0

The security group's rules also do not have a source IP, well they do its 0.0.0.0/0

我真的AP preciate任何与通过浏览器获取该网站可视的所有帮助。

I would really appreciate any and all help in getting this site ' viewable ' via a browser.

推荐答案

在默认情况下,你的情况下,将只在默认安全组。如果它是一个EC2实例的实例正在运行时,你不能改变安全组,你必须事先指定。如果它是一个VPC例如,你可以在运行时更改安全组。

By default, your instances will only be in the default security group. If it's an EC2 instance you cannot change security groups while the instance is running, you'll have to specify them in advance. If it's a VPC instance you can change security groups at runtime.

但是,您可以添加规则以允许使用80端口到默认安全组;只是不成立其不能与正在运行的实例相关联的新的安全组

You can however add the rule to allow port 80 to that default security group; just don't create a new security group as it can not be associated with the running instance.

此外,请确保您的网络服务器是启动和运行。从您的实例(使用SSH shell访问),检查是否正确的流程正在侦听端口80,使用命令 netstat的-lnp 。然后,您应该看到一排 TCP 本地地址结尾:80。列出的IP地址应该是0.0.0.0(意为任何IP),或收听网络接口的一个特定的IP。

Also, make sure that your web server is up and running. From your instance (using SSH shell access), check if the right process is listening on port 80, using the command netstat -lnp. You should then see a row with proto tcp and a Local Address ending in :80. The IP Address listed should be either 0.0.0.0 (meaning 'any IP') or a specific IP of a listening network interface.

如果您需要一个Web服务器,看看Apache或Nginx的。它们都支持PHP。

If you are in need of a web server, take a look at Apache or Nginx. They both support PHP.

希望这有助于。

这篇关于通过浏览器连接到亚马逊(AWS)的EC2实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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