Passing to fastcgi didn’t work for me. After a few hours of searching, I have found solution here:
http://ffct.cc/solving-nginx-php-fpm-access-denied-issue/
In short:
since PHP versions > 5.3.8, to make it works, you should add directive to your php-fpm.conf:
security.limit_extensions = .php .html .js
The recognition sign is “Access denied.” (notice that it’s different from HTTP error 403) when accesssing .html
or .js
file.