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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s