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; 
		}
}
相关推荐
YJQ996720 分钟前
Nginx防盗链及HTTPS:保护网站内容安全与加密传输
nginx·安全·https
遇到我又惊又喜38 分钟前
DELL R740服务器闪黄灯不开机故障案例
运维·服务器
m0_5642641842 分钟前
springboot项目之websocket的坑:spring整合websocket后进行单元测试后报错的解决方案
java·经验分享·spring boot·websocket·spring·单元测试·报错
平谷一勺1 小时前
docker存储
运维·docker·容器
华青水上1 小时前
第一节:Linux系统简介
linux·运维·服务器
每日出拳老爷子1 小时前
[Linux运维] [Ubuntu/Debian]在Lightsail Ubuntu服务器上安装Python环境的完整指南
linux·运维·ubuntu·debian
s_little_monster2 小时前
【Linux】基于环形队列的生产消费者模型
linux·运维·服务器·经验分享·笔记·学习·学习方法
SunTecTec2 小时前
Linux 在个人家目录下添加环境变量 如FLINK_PROPERTIES=“jobmanager.rpc.address: jobmanager“
linux·运维·服务器
杨凯凡2 小时前
Linux性能大师:htop与nmon实战对比分析
linux·运维·服务器
IT闫2 小时前
【Docker】——在Docker工具上安装创建容器并完成项目部署
运维·docker·容器