Apache 安裝運行測時候提示錯誤 (13)Permission denied: AH00091:

Apache 提示錯誤信息爲日誌不能寫入。

具體是:

(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

導致這個問題的原因是 SELinux 運行在 enforcing 模式。

這個將會禁止 Apache 將日誌寫入到費標準的日誌目錄中。

你需要運行下面的命令將日誌配置到 SELinux 中。

semanage fcontext -a -t httpd_log_t “/home/vhosts/ossez.com/(/.*)?”
restorecon -Rv /home/vhosts/ossez.com

 

然後重啓服務器,你應該可以看到沒有這個錯誤了。

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


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章