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 just installed CentOS on a vmware machine that uses a bridged connection, installed apache, php and mysql, but when I run service httpd start I get a warning(?):

Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName

I can connect to the server using putty, so I really have no idea why it won't load in the browser.


Httpd starts successfully, return [ OK ]. Running netstat -tuplen | grep :80 yields:

tcp   0   0 :::80     :::*     LISTEN    0     40392   15894/httpd

I am able to connect with putty to, but browser says can't connect to

share|improve this question
Does httpd finish starting successfully after that? Does it end up listening on the correct ports? What address are you using to access the system, and what error do you get in your browser? – Shane Madden Sep 5 '12 at 2:21
updated question – localhost Sep 5 '12 at 2:34
You should fix your /etc/hosts file to reflect the host's name and fully-qualified domain name regardless... – ewwhite Sep 5 '12 at 2:50
up vote 0 down vote accepted

I'll hazard a guess that you have default rules blocking port 80 in iptables.

Verify with iptables -L - there probably isn't a rule allowing the port 80 traffic.

Use iptables -I INPUT -m tcp --dport 80 -j ACCEPT to allow the traffic, and service iptables save to make the change persistent.

share|improve this answer
Perfect! Used -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT in /etc/sysconfig/iptables and now it's all good. – localhost Sep 5 '12 at 2:50

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.