Take the 2-minute tour ×

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

1 Answer 1

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


