403 Forbidden nginx/1.6.3 (centos 6.6)

April 12, 2015 5k 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

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

Have another answer? Share your knowledge.