Nginx 403 selinux

To check if SELinux is running:

To disable SELinux until next reboot:

Restart Nginx and see if the problem persists. If you would like to permanently alter the settings you can edit  /etc/sysconfig/selinux

If SELinux is your problem you can run the following to allow nginx to serve your www directory (make sure you turn SELinux back on before testing this. i.e,  # setenforce Enforcing)

If you’re still having issues take a look at the boolean flags in  getsebool -a, in particular you may need to turn on  httpd_can_network_connect for network access

For me it was enough to allow http to serve my www directory.

未經允許不得轉載:GoMCU » Nginx 403 selinux

評論 搶沙發

  • 昵稱 (必填)
  • 郵箱 (必填)
  • 網址