Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up Nginx on a new micro-instance on AWS

Tags:

I'm trying to figure out how to set up Nginx on a micro-instance on AWS.

The micro-instance is set up and running. I've associated an elastic IP to it. I SSH into it, make a new user run apt-get upgrade, then apt-get install nginx. Nginx gets installed. Then I run sudo service nginx start. It looks like nginx is started. I can see the workers as running processes.

So I try to access the server through the public IP ie. elastic IP via my browser in hope of seeing the 'Welcome to Nginx' screen. But all I get is the message that the server can't be found.

I'm clueless on how to continue.

like image 956
Jonathan Avatar asked Jan 09 '14 17:01

Jonathan


1 Answers

To verify that the problem isn't with the server, try running a wget http://localhost/ from your instance and see if you get the page you're expecting. If you do, it's probably firewall related.

When you created your instance, you had to provide a security key (this is what you use to ssh into it) and a security group.

You need to make sure that your security group has port 80 open (assuming you have nginx configured on port 80).

If you have a new AWS account, and you're running your instance inside a VPC, you need to make sure your VPC has an internet gateway attached.

like image 129
chris Avatar answered Sep 18 '22 05:09

chris