Home  >  Article  >  php教程  >  nginx+phpfpm页面显示空白的问题

nginx+phpfpm页面显示空白的问题

WBOY
WBOYOriginal
2016-06-06 20:07:341258browse

今天下午配置了nginx+php的环境,准备放个wordpress玩玩。但配置好后页面php的页面一直显示空白,起初我以为是权限问题,将权限改成755后依然不行。然后我就开了nginx和php的日志,但在日志里根本就没有反应什么错误的情况。继续尝试更改php的日志无果。晚上

今天下午配置了nginx+php的环境,准备放个wordpress玩玩。但配置好后页面php的页面一直显示空白,起初我以为是权限问题,将权限改成755后依然不行。然后我就开了nginx和php的日志,但在日志里根本就没有反应什么错误的情况。继续尝试更改php的日志无果。晚上回家后继续尝试了很久,最终发现是nginx的配置文件里面少写了一条配置信息。

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

正因为缺了这条配置信息,所以导致nginx没有发送要解析的php文件地址给phpfpm,所以页面一直是空白的,也没有解析的错误信息。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn