Apache installation and running test prompt error (13) Permission denied: AH00091

Posted May 25, 20201 min read

Apache indicates that the error message is that the log cannot be written.

specifically is:

(13) Permission denied:AH00091:httpd:could not open error log file /var/www/html/vhosts/ossez.com/wiki.ossez.com/logs/errors.log.
AH00015:Unable to open logs

The cause of this problem is that SELinux is running in enforcing mode.

This will prevent Apache from writing logs to the standard log directory.

You need to run the following command to configure logging into SELinux.

semanage fcontext -a -t httpd \ _log \ _t "/home/vhosts/ossez.com/(/.*)?"
restorecon -Rv /home/vhosts/ossez.com

Then restart the server, you should see that there is no such error.

https://www.ossez.com/t/apache-13-permission-denied-ah00091-httpd-could-not-open-error-log-file/91