To check if SELinux is running:
# getenforceTo disable SELinux until next reboot:
# setenforce PermissiveRestart Nginx and see if the problem persists. If you would like to permanently alter the settings you can edit
/etc/sysconfig/selinuxIf 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)
# chcon -Rt httpd_sys_content_t /path/to/wwwIf 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_connectfor network access
# setsebool -P httpd_can_network_connect onFor me it was enough to allow http to serve my www directory.