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; 
		}
}
相关推荐
爱喝水的鱼丶5 分钟前
SAP-ABAP:调试器高级工具使用——内表分析、SQL追踪、内存检查功能实操
运维·sql·性能优化·sap·abap·经验交流
XiangrongZ5 分钟前
debian中配置stm32的交叉编译环境
运维·stm32·debian
cuiyaonan200012 分钟前
some weird issues regarding docker
运维·docker·容器
難釋懷19 分钟前
Nginx外置缓存-redis2-nginx-module
nginx·缓存·junit
love530love1 小时前
Ubuntu系统通过Homebrew安装Lightpanda完整实战教程(含端口占用排坑)
大数据·linux·运维·人工智能·elasticsearch·搜索引擎
淮北4941 小时前
如何服务器和本地实现挂载
运维·服务器
j7~1 小时前
【Linux】二十八.线程篇五《Linux多线程编程:线程同步之条件变量》---详解
linux·运维·c++·学习·条件变量·线程同步
木易 士心1 小时前
服务器构建指南:从选型、部署到高可用架构详解
运维·服务器·后端·架构
为啥全要学1 小时前
fastapi websocket全双工通信
websocket·网络协议·fastapi
openFuyao1 小时前
openFuyao社区Agentic Ops SIG正式成立!组队构建面向AI云原生的智能运维技术体系
运维·人工智能·云原生