NGXIN;PHP-FPM after installation, HTML static page is no problem, but Phpinfo page returns 200, but always blank page
There is no error, consider should be nginx PHP page has been transferred to the PHP processing, so the problem should be in the configuration of PHP, after looking, found that the need to add a word in Nginx
Fastcgi_param script_filename $document _root$fastcgi_script_name;
The default Fastcgi_params configuration file does not have the above sentence after installing Nginx.
In nginx.conf
location ~. php$ {
root HTML ;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
#fastcgi_param Script_filename /scripts$fastcgi_script_name;
fastcgi_param Script_filename $ Document_root$fastcgi_script_name;
include Fastcgi_params;
}
or add
# php only in the Fastcgi_params configuration file, required if PHP is built with--enable-forCe-cgi-redirect
fastcgi_param redirect_status
fastcgi_param SCRIPT_ FILENAME $document _root$fastcgi_script_name;
And then restart Nginx to display the page.