centos7 nginx 403 forbidden 原因及解决办法

来源:互联网 发布:索信达数据 编辑:程序博客网 时间:2024/05/29 05:00

selinux 开启导致 nginx 403

If you still see permission denied after verifying the permissions of the parent folders, it may be SELinux restricting access.

To check if SELinux is running:

getenforce

To disable SELinux until next reboot:

setenforce Permissive

Restart Nginx and see if the problem persists. To allow nginx to serve your www directory (make sure you turn SELinux back on before testing this. i.e, setenforce Enforcing)

chcon -Rt httpd_sys_content_t /path/to/www

0 0
原创粉丝点击