Many friends in the first contact with Nginx, configuration php-fpm will encounter can not parse index.php page situation, make restless, thought clearly is according to the official documents why this situation occurs?
Usually we will configure as follows:
Location ~ \.php$ {Root/usr/share/nginx/html;fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;fastcgi_par Am script_filename/usr/share/nginx/html/$fastcgi _script_name;include fastcgi_params;}
Here is a script_filename variable, possibly for historical reasons fastcgi_params this file does not contain the variable, the definition of the change amount is actually in the fastcgi.conf file. So replace the include line with
Include fastcgi.conf;
Or simply comment out the Fastcgi_param line to resolve the problem.
This article is from the Linux OPS blog, so be sure to keep this source http://arm2012.blog.51cto.com/2418467/1977514
Nginx config PHP fastcgi cannot resolve the problem