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; 
		}
}
相关推荐
无足鸟ICT1 小时前
【RHCA+】sosreport(收集诊断文档)
linux·运维·服务器
IT大白鼠2 小时前
当 AI 开始自动化渗透:FBI ARTEX 警报的防守对策
运维·人工智能·自动化
Decay__2 小时前
SQLServer 运维自动化平台 —— PowerShell + SQL Agent 作业:部署、监控、巡检、告警、工单闭环一体化
运维·数据库·sql·mysql·架构
A-刘晨阳3 小时前
K8S 二进制集群搭建(一主两从)v1.37.2 版本
运维·云原生·容器·kubernetes·calico·nerdctl
tonydf3 小时前
没完了,Nginx又报新漏洞!
运维·nginx
瑞雪兆丰年兮4 小时前
Linux零基础快速入门-第二章 Linux基础命令
linux·运维·服务器
lambo mercy4 小时前
01初识docker
运维·docker·容器
时间的拾荒人7 小时前
Docker 入门实战:从核心概念、安装配置到镜像操作与 Dockerfile 定制
运维·docker·容器·eureka
光电笑映7 小时前
TCP 为什么可靠?从三次握手、滑动窗口到拥塞控制全面拆解(上)
运维·服务器·网络·udp
飞奔的瓜牛7 小时前
Linux 下使用 OpenSSL 生成自签名证书完整指南
运维·服务器·nginx