Nginx-PHP-HTTP状态200响应,页面空白问题

奇葩问题,返回虽然HTTP CODE是200,但内容直接返回空。
经过查找网站,对比之前写过的配置文件,测试表明在配置文件里加入如下语句即可解决:

fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;

比如

	location ~ .php$ {
fastcgi_read_timeout 300;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

参考过的链接:http://www.tuicool.com/articles/7vMNRfj


未经允许不得转载:阿藏博客 » Nginx-PHP-HTTP状态200响应,页面空白问题

赞 (0) 打赏