码迷,mamicode.com
首页 > Web开发 > 详细

nginx php-fpm 配置问题(1)

时间:2016-05-05 12:55:18      阅读:159      评论:0      收藏:0      [点我收藏+]

标签:

nginx php-fpm 配置问题(1)

1.问题    Nginx/FPM/PHP all php files say ‘File not found.‘

nginx error日志:

[error] 20277#0: *21 FastCGI sent in stderr: "Primary script unknown"  while reading response header from upstream, client: 127.0.0.1, 

解决: 

修改nginx.conf配置

location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_intercept_errors on;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;

//修改下面这个配置,默认配置为
//fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
//--> 改成下面这样 $document_root为root配置的值
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

} 

参考:

[nginx-1.4.3识别fastCGI报错 Primary script unknown](http://lovelace.blog.51cto.com/1028430/1314565)

nginx php-fpm 配置问题(1)

标签:

原文地址:http://www.cnblogs.com/ZhYQ-Note/p/5461271.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!