Nginx 403 forbidden

Though you have set all permissions right for files and folders which nginx needs to access you might face with the strange 403 error. That would be probably because of the SELinux. You would probably need to set enforce level to permissive. Run this command :

# setenforce Permissive

This will set the particular enforce level till reboot. Or else you can choose to change the SELinux context for your directory alone using this :

# chcon -Rt httpd_sys_content_t /path/to/www

Remember to change back the enforce level after using above command. This is the original stackoverflow post.