Nginx error FastCGI sent in stderr: “Access to the script [folder] has been denied (see security.limit_extensions)”

Question:

I am trying to configure my webserver using Nginx and php-fpm
I have successfully configured before in my local computer and dev server, but not now in AWS.
The only difference is I installed Nginx from a source in production server

It gives an error like these in my /var/log/nginx/error.log

While the error log in php-fpm gives no error

Here is my nginx.conf

Here is my nginx_host.conf

Here is my /etc/php5/fpm/conf/www.conf

I’ve read from access denied on nginx and php and try to chmod and I’ve tried the solution from Nginx 403 forbidden for all files and here is my result

I turned the autoindex on just for seeing if my root directory is right, the weird thing is I can open all files except PHP files

You can see a live example at http://brandapi.whatiwear.com/

What is wrong with my webserver..?

Answer:

I removed these two configurations from the nginx.conf file.

It works.

Leave a Reply