0

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

3
  • 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? Sep 5, 2012 at 2:21
  • updated question
    – localhost
    Sep 5, 2012 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, 2012 at 2:50

1 Answer 1

0

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.

1
  • 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, 2012 at 2:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .