-
- 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;
- }
-
Copy the code
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;
Copy code
Restart nginx, that is The page can be displayed normally.
Articles you may be interested in:
Blank page problem occurs when fastcgi_param runs php under nginx
Solution to the problem that nginx+php-fpm page displays blank
About the organizational structure of nginx+php-fpm configuration file
|