(13) Permission denied: httpd: could not open error log file

Those who have later versions of Fedora Core installed and trying to set up virtual hosts in Apache may encounter the following error:

(13)Permission denied: httpd: could not open error log file

As a result Apache refuses to start.

This problem should be easy to fix if it has to do with SELinux. Check what kind of security attributes you have in your /var/log/httpd , /var/www and other related directories using

ls -lZ

command and be sure to set the same attributes for the directories where you have you virtual hosts html files, logs, etc

For example if you have your virtual host html files in /server/1/html and your log files in /server/1/log you should issue the following commands to set the right attributes:

chcon -R system_u:object_r:httpd_sys_content_t /server/1/html

and

chcon -R system_u:object_r:httpd_log_t /server/1/log