3

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 
6
  • I doubt that is all that was in your logs. Please post full and complete logs. Commented Aug 14, 2011 at 4:05
  • thats it, it was line after line after line of "Unable to open logs" Commented Aug 14, 2011 at 4:08
  • What does running httpd -X as root say? Commented Aug 14, 2011 at 4:17
  • nothing......... Commented Aug 14, 2011 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. Commented Aug 14, 2011 at 4:33

2 Answers 2

2

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.

0

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 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.