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. ...
随机推荐
- 图之强连通--Tarjan算法
强连通分量 简介 在阅读下列内容之前,请务必了解图论基础部分. 强连通的定义是:有向图 G 强连通是指,G 中任意两个结点连通. 强连通分量(Strongly Connected Components ...
- 两种大小写比较|elif|
name = ['alle','mike','tom','jerry','alice','hebe'] for i in name: if i == 'tom': print 'get!' #get! ...
- Java线程池面试
New Thread的弊端 每次new Thread会新建对象,性能差 线程缺乏统一管理,可能无限制的新建线程,相互竞争,有可能占用过多系统资源导致死机或OOM 缺少更多功能,如更多执行.定期执行.线 ...
- idea常用快捷键(对于新手不建议切换使用eclipse)
查看方法实现:ctrl+alt+鼠标实现父类方法:ctrl+i查看方法的具体实现:ctrl+alt(鼠标再点击方法)快速导包:alt+enter格式化:Ctrl+Alt+L格式化当前行:ctrl+sh ...
- PAT甲级——1058 A+B in Hogwarts
1058 A+B in Hogwarts If you are a fan of Harry Potter, you would know the world of magic has its own ...
- screen小脚本
# 创建screen,执行命令,最小化screen #!/usr/bin/env bash screen_name1=$"bdapi" # 检查screen是否存在,等于0.表示s ...
- RPM包和YUM仓库管理
1.RPM包管理 RPMRPM Package Manger,前身Redhat Package Manger,由红帽开发用于软件包的安装升级卸载与查询有一个完整的数据库体系,每个RPM包的所有信息都固 ...
- 西甲官方APP承认监听球迷,或给国内应用带来新思路
在此前,一般巨头或者官方推出的产品.应用等总是值得信赖的.出问题的话一般都是"不可抗拒的外力因素",比如被黑客攻破导致用户隐私被窃取等.但自从Facebook的用户隐私泄露丑闻被曝 ...
- 一、安装Docker CE
卸载旧版本 较旧版本的Docker被称为docker或docker-engine.如果已安装这些,需要卸载以及相关的依赖项. $ sudo yum remove docker \ docker-cli ...
- MySQL表查询
单表查询 表准备 create table emp( id int not null unique auto_increment, name ) not null, sex enum('male',' ...