Today after the installation of Nginx found HTML page can be normal browsing, but the PHP file page Open is a blank look php-fpm log see Nginx Log did not find the problem
Internet search for half a day finally solved, in this make a record memo
One of the sayings on the Internet is the lack of such a word in the Nginx configuration file
Fastcgi_param script_filename $document _root$fastcgi_script_name;
What is that? In fact, he is the definition of PHP used in the server variable is $_server
Http://wiki.nginx.org/NginxHttpFcgiModule This web site there is a word
This module allows Nginx to interact with FastCGI processes and control what parameters are to the process.
In fact, the server, like your PHP CGI, delivers some of the parameters he needs in the past, and at least one of the following two parameters PHP can be executed
Below is a example the minimally necessary parameters for PHP:
Fastcgi_param Script_filename/home/www/scripts/php$fastcgi_script_name;
Fastcgi_param query_string $query _string;
Parameter Script_filename is used by PHP for determining the name of SCRIPT to execute, and Query_string contains the Para meters of the request.
So we're not going to be able to explain the execution of PHP without defining the SCRIPT_FILENAME system variable.
The definition of this variable can be written in the Nginx configuration file nginx.conf can also be written externally in the nginx.conf included in the form.