connect() failed (111: Connection refused) while connecting to upstream 解决方法
今天修改nginx的时候遇到这个问题
页面刷新一直报502错误
最后发现是修改nginx配置的时候, 有的个地方配置错了
报错原文:
19644#19644: *8 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.3.40, server: xx.xx.com, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:9100", host: "xx.xx.com", referrer: "http://xx.xx.com/"
解决方法:
是fastcgi的端口配置的不对, 更改成正确的端口就对了
我的fastcgi端口应该是9000
server {
listen 80;
root /var/www/http/xx/xx/xx/xx/;
index index.php;
server_name xx.xx.com;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
# regex to split $uri to $fastcgi_script_name and $fastcgi_path
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# Bypass the fact that try_files resets $fastcgi_path_info
# see: http://trac.nginx.org/nginx/ticket/321
# set $path_info $fastcgi_path_info;
# fastcgi_param PATH_INFO $path_info;
# include fastcgi.conf;
# fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
access_log logs/access-ecadmin-morty_api.log;
error_log logs/error-ecadmin-morty_api.log;
}
connect() failed (111: Connection refused) while connecting to upstream 解决方法相关推荐
- An error occurred. connect() failed (111: Connection refused) while connecting to upstream
今天早上来忽然线上所有图片都打不开了(实在忒恐怖),打开图片URL发现下图↓ 这顶上告诉我们看error log 那么就去nginx的服务器上看error.log文件,发现总是报下面的错误↓ 网上如 ...
- nginx访问502 gateway,*1 connect() failed (111: Connection refused) while connecting to upstream
安装好nginx,php环境后,配置虚拟主机,结果访问后就报502 gateway,查看日志文件后,显示错误如下: 2019/04/29 16:24:39 [error] 19433#19433: * ...
- connect() failed (111 Connection refused) while connecting to upstream
connect() failed (111: Connection refused) while connecting to upstream 报错 Nginx代理Vue项目,访问基于Flask搭建的 ...
- connect() failed (111: Connection refused) while connecting to upstream, cli
php-fpm没有运行 执行如下命令查看是否启动了php-fpm,如果没有则启动你的php-fpm即可 netstat -ant | grep 9000 没有运行为空,有运行显示 tcp 0 0 12 ...
- socketio连接失败,nginx返回502 connect failed (111: Connection refused)问题解决
问题现象 我们的信控平台,需要实时展示交通信号机的实时灯态(红黄绿.通行进口流向.倒计时等) 现在的信号机,大多都支持国标2007协议或者2017协议,来实现硬件设备与其他平台的通信,主要是通过soc ...
- Linux配置Nginx与PHP-FPM出现[error] 80143#0: *1 connect() failed (111: Connection refused) while connectin
原因是只启动了nginx 没有启动php-fpm /usr/local/sbin/php-fpm [root@localhost ~]# ps aux | grep 'php-fpm' root 80 ...
- nginx报错解决connect() to unix:/tmp/php-cgi-73.sock failed (111: Connection refused
2020/06/09 08:50:16 [error] 6608#0: *1 connect() to unix:/tmp/php-cgi-73.sock failed (111: Connectio ...
- Android --- 怎么样在布局中显示服务器的图片,或者是后台项目中的图片+connect failed: ECONNREFUSED (Connection refused)问题的解决(文章最后)
今天在写Android项目的时候遇到这样一个问题,我已经从后台SpringBoot中拿到了图片id,但是要怎么样显示到AS端呢? 首先看到了网上有用Glide的,我在这里整理一下简单明了的操作步骤 1 ...
- 【nginx】kevent() reported that connect() failed (61: Connection refused)
本文转自:http://www.sjsjw.com/kf_system/article/026756ABA000352.asp 首先确认你的相关服务是否启动了(php-fpm ); ps:如果你的启动 ...
最新文章
- 【django】 F 和 Q 对象
- c语言 连接两个字符串不使用库函数
- thttpd服务器修改时间后导致CPU占用率过高
- SQL Server索引视图以(物化视图)及索引视图与查询重写
- Cocos2d-x之LUA脚本引擎深入分析
- 【思前享后】区块链的起源
- 袭扰战术_战术十必不可少的八
- python编程玩具有哪些_python 全栈开发,Day133(玩具与玩具之间的对话,基于jieba gensim pypinyin实现的自然语言处理,打包apk)...
- setTimeout函数的参数
- 定积分不等式套路总结
- EXCEL技巧——EXCEL如何实现隔行隔列求和
- 1.JAVASE 语言简述
- 长沙有哪些点餐系统服务商?长沙点菜软件哪家好?
- py系统学习笔记:第七阶段:网页编程基础:第二章:CSS3:23.文本、表格属性
- 解决 el-checkbox-group 值为对象的时候 复选框回显问题
- 1072:鸡尾酒疗法(C C++)
- Oracle触发器-校验身份证和字节长度
- 【Excel函数】-Excel字符串系列函数之Find查找函数
- 【妖精的尾巴win7动漫主题】
- IBM小型机系统启动顺序
热门文章
- 共享单车骑行数据分析数据来源
- Android——USB转COM口(CH340)与传感器进行通讯
- VisionPro脚本
- 速度与AI兼得:荣耀Play“GPU Turbo”是什么大杀技?
- 7-11 输出大写英文字母 (15 分)
- 【数据字典】第三篇 利用PowDesigner自动生成数据字典
- Python自动化办公:word文件操作教程
- php缓冲区操作函数,PHP缓冲区的三个函数ob_start();ob_get_contents()
- 三点布光材质连接,做旧
- 电视为何降价至200元依然没人买?爱奇艺给出了答案