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. ...
随机推荐
- springBoot中mybatis错误之 Property 'configuration' and 'configLocation' can not specified with together 解决
mybatis.config-location与mybatis.config-locations不同 mybatis.config-location不加载全局配置文件
- Iterator接口(迭代器)的使用
Iterator接口(迭代器) 前言 在程序开发中,经常需要遍历集合中的所有元素.针对这种需求,JDK专门提供了一个接口java.util.Iterator.Iterator接口也是Java集合中的一 ...
- Java Web实现用户登录界面
一.学习Java Web需要的技术: Java语言基础:算法基础.常用数据结构.编程规范. 掌握常见的数据结构和实用算法:培养良好的编程习惯. Java面向对象:封装.继承.多态等,面向对象程序设计, ...
- BZOJ2733 [HNOI2012]永无乡(并查集+线段树合并)
题目大意: 在$n$个带权点上维护两个操作: 1)在点$u,v$间连一条边: 2)询问点$u$所在联通块中权值第$k$小的点的编号,若该联通块中的点的数目小于$k$,则输出$-1$: 传送门 上周的模 ...
- python3多线程应用详解(第四卷:图解多线程中LOCK)
先来看下图形对比: 发现没有这种密集型计算的任务中,多线程没有穿行的速率快,原因就是多线程在线程切换间也是要耗时的而密集型计算任务执行时几乎没以偶IO阻塞,这样你说谁快
- nginx+php+扩展件安装实践版
一.安装各种软件包 yum -y install wget git vim lrzsz unzip zip gcc make gd-devel bzip2 bzip2-devel libcurl li ...
- Fiddler发送get post测试 笔记
0 环境 系统环境:win7 1 操作 1 post 类似 2 get
- CentOS 配置国内源
阿里云Linux安装镜像源地址:http://mirrors.aliyun.com/ CentOS系统更换软件安装源 第一步 备份你的原镜像文件,以免出错后可以恢复. mv /etc/yum.repo ...
- 数论入门——斐蜀定理与拓展欧几里得算法
斐蜀定理 内容 斐蜀定理又叫贝祖定理,它的内容是这样的: 若$a,bin N$,那么对于任意x,y,方程$ax+by=gcd(a,b)*k(kin N)$一定有解,且一定有一组解使$ax+by=gcd ...
- Part-Linux-2
1.cgi #1.创建cgi-bin目录#2.创建hi.json -> {"hi":"hello"}#3.python2 -m CGIHTTPServer ...