Just did a fresh install of CentOS, I also installed apache, but it won't start.

[root@blah /]# /etc/init.d/httpd start
Starting httpd:                                            [FAILED]

This is what I get. I tried rebooting the os, still nothing. any ideas? I did check /etc/httpd/logs/error_log file and this is what I found.

Unable to open logs
  • I doubt that is all that was in your logs. Please post full and complete logs. – womble Aug 14 '11 at 4:05
  • thats it, it was line after line after line of "Unable to open logs" – M of SoCal Aug 14 '11 at 4:08
  • What does running httpd -X as root say? – Ignacio Vazquez-Abrams Aug 14 '11 at 4:17
  • nothing......... – M of SoCal Aug 14 '11 at 4:23
  • CustomLog /srv/www/example.coms/logs/access.log combined as u can see above i had typed in example.coms with a 's' at the end. apache couldnt find the access.log file i corrected this typo and everything works fine now. thank you. – M of SoCal Aug 14 '11 at 4:33

It is likely that you have a path defined in one of your configuration parameters that doesn't exist or has the wrong permissions. There are some that Apache will be able to start up with even if they don't exist, and others, like the main error log (there are others) that will cause it to fail to start. Look there.

Also, check to make sure it is not already running:

service httpd status


ps aux|grep httpd

If all your paths exist, have good permissions, apache is not already running and you see nothing in your syslog (/var/log/messages by default), then I'd start backtracking by removing the httpd rpm and re-install and start over.


The Unable to open logs error message was caused by an incorrect CustomLog directive

CustomLog /srv/www/example.coms/logs/access.log combined

should have read

CustomLog /srv/www/example.com/logs/access.log combined

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.