Can't access site on EC2 instance via public ip

primer picture primer · Apr 20, 2012 · Viewed 51.5k times · Source

I've been experimenting with EC2 for a couple days and have been banging my head against simply even being able to access the sample site I've hosted. The stack is Rails 3.1.3 with Thin and Nginx.

I've tried several different configurations and finally ended up running the Nginx auto install script, which does return a webpage when I do a curl http://ec2-107-20-143-179.compute-1.amazonaws.com/. However, when I point my browser there, it hangs forever before saying the page cannot be found.

I have assigned an Elastic IP address, and I've enabled HTTP access via port 80.

I don't much experience with the sysadmin side and I'm basically stumped at this point. Any advice would be greatly appreciated.

Answer

Deleteman picture Deleteman · Apr 20, 2012

Did you enable the http port to all ips? That would be done by going to:

EC2 -> Security Group -> Default (or your custome one) -> Inbound

And then Create a new rule for HTTP and as a source, you should assign: 0.0.0.0/0

That should do it.