Nginx+PHP配置错误,日志:[error] 24324#0: *31 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream
一、问题现象
1、安装nginx、php、php-fpm后,浏览器访问php报错,“File not found”;
二、问题排查
1、检查nginx、php-fpm服务是否正常启动,均正常启动;
2、检查服务端口号,分别是nginx:81、php:9000
3、查看nginx错误日志 /usr/local/nginx/logs/error.log tail -n 20 error.log
[error] 24324#0: *31 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream
三、解决方法
1、粘贴错误日志信息到百度,发现是nginx配置文件缺少参数导致,参考链接:https://www.cnblogs.com/php-linux/p/6526641.html
2、修改nginx.conf配置文件,添加 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 到文件中;

2、重启nginx服务,浏览器访问php文件,成功。
Nginx+PHP配置错误,日志:[error] 24324#0: *31 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream的更多相关文章
- [error] 1507#0: *22 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 10.0.0.1, server: www.wordpress.com, request: "GET /info.p
字体比较小,如果你遇到这个问题请仔细的把下面的总结看完. 环境:CentOS6.7.2.6.32-573.el6.x86_64.nginx1.12.2 .php5.5.38 问题:nginx能解析静态 ...
- 【nginx】 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream
2013/10/22 20:05:49 [error] 12691#0: *6 FastCGI sent in stderr: "Primary script unknown" w ...
- 解决nginx FastCGI sent in stderr: “Primary script unknown”
今天重启了mac,突然发现本地的 lnmp 服务不能用了,什么请求都返回了: FastCGI sent in stderr: "Primary script unknown" 这个 ...
- NGINX+PHP-FPM7 FastCGI sent in stderr: “Primary script unknown”
https://www.cnblogs.com/hjqjk/p/5651275.html 一开始是Nginx打开网页显示一直是拒绝访问.查看nginx日志是报错显示我的题目,然后就各种搜索解决啊! 百 ...
- 修复Nginx 502错误:upstream sent too big header while reading response header from upstream
原文出处:https://www.cnblogs.com/jpfss/p/10237463.html 便于以后参考我复制了过来! cookies的值超出了范围我是说 看看了一下日志 错误502 ups ...
- nginx log 错误502 upstream sent too big header while reading response header from upstream
cookies的值超出了范围我是说 看看了一下日志 错误502 upstream sent too big header while reading response header from upst ...
- nginx 错误502 upstream sent too big header while reading response header from upstream
查看nginx的错误日志,得到以下错误信息:upstream sent too big header while reading response header from upstream按字面意思理 ...
- nginx error: upstream prematurely closed connection while reading response header from upstream
本篇文章由:http://xinpure.com/nginx-error-upstream-prematurely-closed-connection-while-reading-response-h ...
- *2 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected '[' in /application/nginx-1.6.3/html/zabbix/index.php on line 32" while reading response header from upstream, clien
今天呢想学习一下zabbix监控一下我的服务情况,然后就开始安装我的zabbix服务,首先LNMP环境准备好了,Nginx版本为1.6.3,php版本为5.3.27,MySQL版本为二进制包安装的5. ...
随机推荐
- SLAM领域资源链接
半闲居士高翔博客: https://www.cnblogs.com/gaoxiang12/ 视觉大佬冯兵博客: http://www.fengbing.net/ SLAMCN http://www.s ...
- goweb-文本处理
文本处理 Web开发中对于文本处理是非常重要的一部分,我们往往需要对输出或者输入的内容进行处理,这里的文本包括字符串.数字.Json.XML等等.Go语言作为一门高性能的语言,对这些文本的处理都有官方 ...
- Macroevolution|Silent changes|CNEs|Transposable elements|Neutral sites
Interspecies genomic comparison 因为脊椎动物诞生早,在演化过程中有Macroevolution(因为自然选择或遗传漂变导致持续突变同时表型发生改变),但是存在一种基因缺 ...
- java threadlocal 背景 本质
背景 JAVA中有全局变量(静态变量,不论在哪个函数 都能访问).局部变量(函数中定义的变量,在栈中,只能在本函数内访问),主要这2种类型. threadlocal变量 是一种线程级全局的变量(普通的 ...
- 如何将jar包打包到本地maven仓库
--例如下载jar到本地(例如经常用到的oracle数据库驱动) --前提本地已将安装maven并配置好环境,cmd并切换到jar包的文件夹下,执行以下命令,注意DgroupId.DartifactI ...
- ununtu 16.04 下的 VsCode 下载与安装
Vscode发现用包下载显示找不到网页,于是只有继续折腾. 折腾如下: ubuntu-desktop You can update your system with unsupported packa ...
- php函数 之 iconv 不是php的默认函数,也是默认安装的模块。需要安装才能用的。
windows下最近在做一个小偷程序,需要用到iconv函数把抓取来过的utf-8编码的页面转成gb2312, 发现只有用iconv函数把抓取过来的数据一转码数据就会无缘无故的少一些. 让我郁闷了好 ...
- Linux BASH简单总结
BASH: 变量的设置规则: 1.变量与变量内容以一个符号"="来链接 2.等号两边不能直接接空白字符 3.变量名称只能是英文字母与数字,但是不能以数字开头 4.变量内容若有空白字 ...
- 清除无用工具栏:CommandbarCleaner下载
下面演示的工具,适用于Office任一版本. 使用本工具之前,预先打开相应的Office软件. 下载: CommandbarCleaner.rar
- E丢丢App重设计总结
E丢丢学习App是华夏大地教育可以有限公司旗下的一款产品,专为提升学历者打造,它整合了线上+跟踪的 (E平台)功能,方便工作人员随时随地管理账号.跟进学员:同时还可以随时了解教育行业的新闻资讯.一对一 ...