Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

EDIT:

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 192.168.0.113, but browser says can't connect to 192.168.0.113

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.