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.

Just did a fresh install of centos, i also installed apache, but it wont 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
share|improve this question
    
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
show 1 more comment

2 Answers

up vote 2 down vote accepted

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

or

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.

share|improve this answer
add comment

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
share|improve this answer
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.