Hello,
I installed Rocky linux 9.3 (Linux version 5.14.0-362.13.1.el9_3.x86_64 ( mockbuild@iad1-prod-build001.bld.equ.rockylinux.org) (gcc (GCC) 11.4.1 20230605 (Red Hat 11.4.1-2), GNU ld version 2.35.2-42.el9) #1 SMP PREEMPT_DYNAMIC Wed Dec 13 14:07:45 UTC 2023)
The HTTPD service can not be started. The error log is defined in /etc/httpd/conf.d/vhost0.conf as:
ErrorLog "/mytest/logs/error_log"
Here is my output from systemctl status httpd
*Jan 19 16:09:37 example.com http://example.com httpd[18864]: (13)Permission denied: AH00091: httpd: could not open error log file /mytest/logs/error_log.Jan 19 16:09:37 example.com http://example.com httpd[18864]: AH00015: Unable to open logs*
Please help me understand why there is a Permission denied issue. Thanks.
Regards,
On 1/19/2024 1:17 PM, Xinhuan Zheng via rocky wrote:
Jan 19 16:09:37 example.com http://example.com httpd[18864]: (13)Permission denied: AH00091: httpd: could not open error log file /mytest/logs/error_log.
Smells like a selinux issue. That's not the normal place that Apache is allowed to write logs. I'd suggest moving the log to /var/log/apache/vhost0 or something similar.
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/htm...
https://www.serverlab.ca/tutorials/linux/web-servers-linux/configuring-selin...