Skip to content

SELinux == Enforcing and Nginx returns 403 for static files

For those who has SELinux == Enforcing and Nginx returns 403 for static files :

  1. Enable SELinux httpd_can_network_connect feature

    sudo setsebool -P httpd_can_network_connect on 2. check SELinux enforce

    getenforce 3. If it is Enforcing -

    chcon -Rt httpd_sys_content_t /path/to/www