403 Forbidden nginx/1.6.3 (centos 6.6)

Posted April 12, 2015 11.9k views

after i installed nginx & php-fpm, i run my website on browser, it showed 403 Forbidden (nginx/1.6.3). Then i check my error log. i showed me error: “……/index.php” is forbidden (13: Permission denied).

After that I changed index.php file to 777 for both root and nginx user but it always show forbidden error.

Could you please help me to explain how should i check? Thanks

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Can you paste your config and file structure?

Did you change the permissions for the right file?

I found the way to fix. Thanks for your response.

Here’re solution for me:
sudo chown nginx:nginx * -R
sudo usermod -a -G nginx nginx