Centos – apache won’t start httpd service start centos 6.3

apache-2.2centoscentos6

I've installed httpd in CentOS 6.3

yum install httpd

After successfully installing it, I tried to start it

service httpd start

Nothing happend. I opened the browser and typed my IP address but could not connect.

Update:

Now I've reinstalled httpd

when i run

service httpd start

message displayed

Starting httpd: no listening sockets available, shutting down
Unable to open logs

Best Answer

There could be few issues over here.

  1. Selinux -selinux is enabled in your machine, and that is preventing from starting the Apache. You can try disabling selinux and try restarting the httpd. You can do that by this command setenforce 0

  2. You are not running this command with root privileges. To do that, use sudo and execute the command like this $ sudo service httpd start

  3. Also, there might be something already running on port 80. To check that use this command netstat -npl | grep 80 If this command is showing something then that means some other application is running on that port.

One last thing you can try is that, you have already http running, and the connection is refused may be because of some firewall or something else.

To check the same, use command with restart and simply with start.

So, give this command $ sudo service httpd restart

If this command doesn't give any error this time, which you are seeing normally, that means that httpd is running but the connection refused is may be because of something else.

Related Topic