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; 
		}
}
相关推荐
DianSan_ERP10 小时前
电商API接口全链路监控:构建坚不可摧的线上运维防线
大数据·运维·网络·人工智能·git·servlet
呉師傅11 小时前
火狐浏览器报错配置文件缺失如何解决#操作技巧#
运维·网络·windows·电脑
不是二师兄的八戒11 小时前
Linux服务器挂载OSS存储的完整实践指南
linux·运维·服务器
芝士雪豹只抽瑞克五11 小时前
Nginx 高性能Web服务器笔记
服务器·nginx
zhangfeng113312 小时前
趋动云 如何ssh登录 服务区 项目server
运维·人工智能·ssh
ZeroNews内网穿透13 小时前
谷歌封杀OpenClaw背后:本地部署或是出路
运维·服务器·数据库·安全
失重外太空啦13 小时前
nginx
运维·nginx
Gofarlic_oms113 小时前
避免Kisssoft高级分析模块过度采购的科学评估方法
大数据·linux·运维·人工智能·matlab
田井中律.13 小时前
服务器部署问题汇总(ubuntu24.04.3)
运维·服务器
大大水瓶14 小时前
HAProxy 从入门到实战:负载均衡与流量管理全解析
运维·负载均衡