Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So, I just set up my first LAMP server. I think.

I followed this guide and then proceeded to connect to it using Filezilla, so that means that it exists, at least.

I made an index.html and placed it inside /var/www/html

However, when I enter in my Elastic IP address or the public DNS and try to navigate to it, my browser tells me that it can't connect.

How can I find out where I went wrong, and fix it?

I saw that I should provide this information from my concurrent Googling:

 sudo iptables --list -n -t nat                   
target     prot opt source               destination         

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

target     prot opt source               destination         

There ports are open on the Security Groups tab:

20 - 21   
22 (SSH)   
80 (HTTP)   
1024 - 1048   
share|improve this question
up vote 0 down vote accepted

You most likely don't have port 80 open in your instance's security groups. Check this link for more details:

One other thing you can verify is if apache listening on port 80? Check you Apache configuration or run "netstat -anp | grep 80" as root. Also, make sure your Apache virtual host has your Elastic DNS name (or whatever DNS address you're using to access the server) either as the ServerName or a ServerAlias.

share|improve this answer
I replaced NameVirtualHost *:80 with NameVirtualHost [the-ip]:80 and that didn't work. I also ran netstat -anp and that didn't seem to help. Do I need to restart apache for the changes to take effect? – Houseman May 14 '13 at 21:46
Also, I updated my question to include information about my security groups – Houseman May 14 '13 at 21:46
Yes, I restarted apache (it told me httpd was not running, and that it would start it), then it worked – Houseman May 14 '13 at 22:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.