apache start error - httpd dead but subsys locked
Posted: Mon Mar 02, 2009 7:39 am
Hi,
I have just installed apache on Centos and the server started fine, 'service httpd status' was ok. the browser work.
i tried to restart 'service httpd restart' after changing the config file and stopping "FAILED" and starting "OK". when i look for httpd processes 'ps -aux | grep httpd' nothing appears, and localhost in the browser shows "failed to connect". 'service httpd status' returns "httpd dead but subsys locked".
In the error_log it says:
[Mon Mar 02 13:19:33 2009] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t:s0
[Mon Mar 02 13:19:33 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 02 13:19:33 2009] [notice] Digest: generating secret for digest authentication ...
[Mon Mar 02 13:19:33 2009] [notice] Digest: done
[Mon Mar 02 13:19:34 2009] [warn] pid file /etc/httpd/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Mon Mar 02 13:19:34 2009] [error] (13)Permission denied: could not create /etc/httpd/logs/httpd.pid
[Mon Mar 02 13:19:34 2009] [error] httpd: could not log pid to file /etc/httpd/logs/httpd.pid
i have been searching for answers and some people say delete the /var/run/httpd.pid file. i did that but still it wont work. i have also tried deleting the /var/locl/subsys/httpd file and this does not work. strangley the only way i can get apache to work is if i type 'httpd -X' but i am not sure what this doing.
i cant find any other advise on the net. any ideas?
I have just installed apache on Centos and the server started fine, 'service httpd status' was ok. the browser work.
i tried to restart 'service httpd restart' after changing the config file and stopping "FAILED" and starting "OK". when i look for httpd processes 'ps -aux | grep httpd' nothing appears, and localhost in the browser shows "failed to connect". 'service httpd status' returns "httpd dead but subsys locked".
In the error_log it says:
[Mon Mar 02 13:19:33 2009] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t:s0
[Mon Mar 02 13:19:33 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 02 13:19:33 2009] [notice] Digest: generating secret for digest authentication ...
[Mon Mar 02 13:19:33 2009] [notice] Digest: done
[Mon Mar 02 13:19:34 2009] [warn] pid file /etc/httpd/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Mon Mar 02 13:19:34 2009] [error] (13)Permission denied: could not create /etc/httpd/logs/httpd.pid
[Mon Mar 02 13:19:34 2009] [error] httpd: could not log pid to file /etc/httpd/logs/httpd.pid
i have been searching for answers and some people say delete the /var/run/httpd.pid file. i did that but still it wont work. i have also tried deleting the /var/locl/subsys/httpd file and this does not work. strangley the only way i can get apache to work is if i type 'httpd -X' but i am not sure what this doing.
i cant find any other advise on the net. any ideas?