nginx+php部署FastCGI sent in stderr: "Primary script unknown" while reading response head...

部署zabbix的lnmp环境时,测试php页面打不开,查看nginx的errorlog日志,报错FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream,php

一、网上查询有修改nginx.conf的,以下nginx

fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name; 修改成 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

而后执行service nginx reload 或者service nginx restart 或者进入/etc/init.d/nginx  restartphp-fpm

笔者是修改上面这个配置就解决了。测试

二、部分有说是php-fpm中user和group未指定nginx为其用户的。(个人配置里已提早指定过,因此排除这个缘由,没配置的同窗能够试试)spa

编辑php-fpm的配置 vi /usr/local/php/etc/php-fpm.conf

大概在149行3d

 

 配置完检查进程ps -ef | grep phprest

相关文章
相关标签/搜索