【发布时间】:2015-08-28 14:57:43
【问题描述】:
最后,I've succeeded to start nginx.
现在,它代表 root 创建日志文件。
那么,有什么想法为什么会发生,我该如何解决?
nginx.conf 的第一行是user nginx;
【问题讨论】:
标签: nginx
最后,I've succeeded to start nginx.
现在,它代表 root 创建日志文件。
那么,有什么想法为什么会发生,我该如何解决?
nginx.conf 的第一行是user nginx;
【问题讨论】:
标签: nginx
所以,我已经设法解决了这个问题。
其实解决方法和我的prequel question一样:
# put SELinux in permissive mode
setenforce 0
# send USR1 signal to nginx master process
# master process reopens files, does chown() and chmod() to enable
# the worker processes to write to files, and send a notification to
# the worker procesess, so they reopen files instantly
# you can find the path to the nginx pid file in the nginx.conf
kill -USR1 `cat /var/run/nginx.pid`
# create SELinux module
grep nginx /var/log/audit/audit.log | audit2allow -M nginx
# apply module
semodule -i nginx.pp
# put SELinux back in enforcing mode
setenforce 1
# remove SELinux module files
rm -rf nginx.{pp,te}
【讨论】:
问题可能是目录的权限设置不同尝试将日志放在 doc root 中的某个位置,以便测试是否是权限问题。将您的发现更新给我,我可能会提供帮助
【讨论】: