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. ...
随机推荐
- D. New Year and Conference(区间交,线段树)
题:https://codeforces.com/contest/1284/problem/D 题意:给定n个1对的时间断,我是这么理解的,甲去参加a时间段的讲座,乙去参加b时间段的讲座,然后若这n对 ...
- Python语言学习:列表常用的方法
python 列表常用的方法 1.append( ):用于在列表末尾添加新的对象 list.appent(obj) #obj:添加到列表末尾的对象 #!/usr/bin/python aList = ...
- Ubuntu更改源地址列表
1. 备份源列表 sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup 2.打开源列表 sudo gedit /etc/apt/sour ...
- www、数组的equals、接口和抽象类、装箱拆箱、final赋值
目录 2019.12.31 刷题笔记 2019.12.31 刷题笔记 www www是World Wide Web的缩写 数组的equals 数组是一个对象,不同类型的数组具有不同的类.数组是一种引用 ...
- [Usaco2009 Oct]Heat Wave 热浪(裸最短路径)
链接:https://ac.nowcoder.com/acm/contest/1082/F来源:牛客网 题目描述 The good folks in Texas are having a heatwa ...
- Codeforces Round #579 (Div. 3) Complete the Projects(贪心、DP)
http://codeforces.com/contest/1203/problem/F1 Examples input 1 - - output 1 YES input 2 - - output 2 ...
- 系统学习javaweb补充1----HTML常用语句
HTML 常用语句 一.单行文本框语法格式 <input type="text" name="输入信息的名字" value="输入信息的值&qu ...
- idea转eclipse快捷键
1.打开idea,点击上方菜单栏中的File, 2.在弹出的setting页面中左侧导航中选择Keymap:在keymaps下拉列表中选择Eclipse:如果想要使用这个快捷键风格,则点击右侧的cop ...
- 2013 ACM网络搜索与数据挖掘国际会议
ACM网络搜索与数据挖掘国际会议" title="2013 ACM网络搜索与数据挖掘国际会议"> 编者按:ACM网络搜索与数据挖掘国际会议(6th ACM Conf ...
- git实用手册
git.exe clone --progress -v "git@code.sohuno.com:huimingtao/focus-wap.git" "D:\worksp ...