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; 
		}
}
相关推荐
Lynnxiaowen1 天前
今天继续学习shell脚本
linux·运维·学习·云计算·bash
hmcjn(小何同学)1 天前
轻松Linux-9.进程间通信
linux·运维·服务器·c++·bash
上海达策TECHSONIC1 天前
经验分享:如何让SAP B1数据库性能提升50%
运维·数据库·运维开发
月光在发光1 天前
19_内核模块挂载问题处理
linux·运维·服务器
牛奶咖啡131 天前
Nginx+Tomcat集群Redis共享session方案
redis·nginx·tomcat·redisson·分布式session共享方案·分布式session实现·jdk1.8环境安装
Liang_GaRy1 天前
心路历程-Linux如何赋予权限?
linux·运维·服务器
路溪非溪1 天前
Linux的gpio子系统
linux·运维·服务器
夫子3961 天前
OnlyOffice的高可用方案如何做
运维·架构
Linux运维技术栈1 天前
Terraform 从入门到实战:历史、原理、功能与阿里云/Azure 上手指南
运维·阿里云·kubernetes·azure·terraform