Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I have set up a CentOS 5.5 server with Apache on it. The httpd service starts just fine (no warnings at all), and I was under the impression that I should see an Apache test page if I was to browse to the server via Firefox or the like (not localley, from a different machine), when no virtual hosts exist?

I have set the HOSTNAME entry in /etc/sysconfig/network, added the FQDN to /etc/hosts, and set the ServerName in etc/httpd/conf/httpd.conf (DocumentRoot is set to /var/www/html).

Is there anything I have missed, or am I barking up the wrong tree completly? Thanks.

share|improve this question
What happens when you try to open test page? Any chance that iptables is blocking requests on server with httpd? – Andrei Mikhaltsov Jul 13 '12 at 11:19
Sorry Andrei, not sure what you mean? Server is called monitor, with IP, and have tried both http://monitor and, both of which show the standard 'Unable to display your webpage' error. Is that what you meaning? Thanks. – David Gard Jul 13 '12 at 11:42
What does netstat -plnt |grep httpd output? – adaptr Jul 13 '12 at 11:57
Can you get to any other services on the machine? SSH for instance. – bshacklett Jul 13 '12 at 18:40
Did you open port 80 in your firewall? – Michael Hampton Jul 13 '12 at 18:43

You say you're getting "webpage cannot be displayed", not "server cannot be reached", so I think that Apache is responding on port 80, but check to see if something like wget http://localhost/ (or links http://localhost) gives you something different. If so, you have a firewall issue. Do you have iptables enabled, and are you blocking port 80? If so, edit /etc/sysconfig/iptables to allow port 80 access, and then service iptables restart.

Assuming Apache IS responding on port 80 to other computers...

CentOS shows the welcome page for an empty vhost directory by default when you:

  1. Have the Include conf.d/*.conf line in httpd.conf.

  2. Have an /etc/httpd/conf.d/welcome.conf that contains:

    Options -Indexes ErrorDocument 403 /error/noindex.html

  3. And /var/www/error/noindex.html exists and is readable by the webserver.

So, I would check all three of those things, once you're sure Apache is responding on port 80.

share|improve this answer

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.