NginxPHP returns 200, but a blank page is displayed. After ngxin; php-fpm is installed, there is no problem with html static pages. However, although the phpinfo page returns 200, no error is reported for blank pages, it should be considered that nginx has transferred the php page to ngxin; after php-fpm is installed, there is no problem with the html static page, but although the phpinfo page returns 200, it is always a blank page
No error is reported. it should be considered that nginx has transferred the php page to php for processing. Therefore, the problem should be found in the php configuration and a sentence should be added to nginx.
Fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name;
After nginx is installed, the default fastcgi_params configuration file does not contain the above sentence.
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 it to the fastcgi_params configuration file.
# PHP only, required if PHP was built with -- enable-force-cgi-redirect
Fastcgi_param REDIRECT_STATUS 200;
Fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name;
Restart nginx to display the page.
Ingress does not report any error. it should be considered that nginx has transferred the php page...