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; 
		}
}
相关推荐
p***93034 分钟前
自己编译RustDesk,并将自建ID服务器和key信息写入客户端
运维·服务器
last demo9 分钟前
iscsi服务器
linux·运维·服务器·php
java_logo17 分钟前
GPUSTACK Docker 容器化部署指南
运维·mongodb·docker·云原生·容器·eureka·express
阿巴阿巴啊啊啊23 分钟前
docker基本操作命令
运维·docker·容器
翻斗花园正门保安小夏44 分钟前
HTTPS + WSS(WebSockets) 完整请求流程架构说明及本地开启HTTPS
websocket·网络协议·https
石像鬼₧魂石2 小时前
如何使用Kali Linux自带字典进行密码破解?
linux·运维·服务器
q***65692 小时前
Nginx反向代理出现502 Bad Gateway问题的解决方案
运维·nginx·gateway
天选之女wow2 小时前
【Hard——Day8】65.有效数字、68.文本左右对齐、76.最小覆盖子串
linux·运维·redis·算法·leetcode
liu_bees2 小时前
Jenkins 中修改 admin 账号密码的正确位置与方法
java·运维·tomcat·jenkins
Leon-Ning Liu3 小时前
MySQL 5.7大表索引优化实战:108GB数据建索引效率提升50%
运维·数据库·mysql