Connect to Amazon (AWS) EC2 instance via browser

amazon-ec2, amazon-web-services

Solution

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.

Add the rule to the `default` group

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.

Is the web server up?

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 server not up

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

Hope this helps.

Problem

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. 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? The security group's rules also do not have a source IP, well they do its 0.0.0.0/0 I would really appreciate any and all help in getting this site ' viewable ' via a browser.

Original source