nginx反向代理websocket 60秒自动断开处理

参考:

https://blog.csdn.net/zqh123zqh/article/details/112795608

添加:

c 复制代码
proxy_read_timeout 600s; 

例如:

c 复制代码
server {
		listen 80;
		server_name carrefourzone.senguo.cc;
		#error_page 502 /static/502.html;
 
		location /static/ {
		    root /home/chenming/Carrefour/carrefour.senguo.cc/source;
		    expires 7d;
        	}
 
		location / {
		    proxy_pass_header Server;
		    proxy_set_header Host $http_host;
		    proxy_redirect off;
		    proxy_set_header X-Real-IP $remote_addr;
		    proxy_set_header X-Scheme $scheme;
		    proxy_pass       http://127.0.0.1:9887;
		    proxy_http_version  1.1;
		    proxy_set_header    Upgrade    "websocket";
		    proxy_set_header    Connection "Upgrade";
		    proxy_read_timeout 600s; 
		}
}
相关推荐
IT研究所5 小时前
IT 资产管理 (ITAM) 与 ITSM 协同实践:构建从资产到服务的闭环管理体系
大数据·运维·人工智能·科技·安全·低代码·自动化
Codefengfeng5 小时前
分辨压缩包的真加密与伪加密
linux·运维·网络
014.6 小时前
2025最新jenkins保姆级教程!!!
java·运维·spring boot·spring·jenkins
leifengzhy6 小时前
Jenkins使用pipeline和maven创建项目
运维·jenkins·maven
码农阿豪6 小时前
Jenkins Git 克隆失败深度解析:从 “Connection reset by peer“ 到彻底解决
运维·git·jenkins
暴力求解6 小时前
Linux---进程(五)进程调度
linux·运维·服务器
wsad05326 小时前
Linux 用户和组管理完整指南(中英文参数对照)
linux·运维·服务器
fjh19978 小时前
使用caddy签发ip证书
运维·服务器
暴力求解9 小时前
Linux进程(六)命令行参数
linux·运维·服务器
我怎么又饿了呀9 小时前
Linux 下 的Vim/Vi 操作指南
linux·运维·vim