-
- 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;
- }
-
复制代码
或在fastcgi_params配置文件中加入:
-
- # 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;
复制代码
重启nginx,即可正常显示页面了。
您可能感兴趣的文章:
nginx下fastcgi_param运行php出现空白页的问题
nginx+php-fpm页面显示空白的解决方法
有关nginx+php-fpm配置文件的组织结构
|