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; 
		}
}
相关推荐
极光通讯10 分钟前
液冷服务器对内存和SSD的适配要求:高密度部署下的散热与信号完整性
运维·服务器
2501_937767162 小时前
面向设计 / 研发部门:终端文件统一归档 + 服务器定时备份实践
运维·安全
重生之高冷汉堡包3 小时前
ChatGPT 如何打造自动化账号:从零搭建到高效运营
运维·chatgpt·自动化
aaa最北边3 小时前
Linux 上的交叉编译
linux·运维·服务器
小张成长计划..3 小时前
【Linux】27:日志
linux·运维·服务器
时间售卖铺3 小时前
Nginx 反向代理
运维·nginx·云原生
life码农3 小时前
Nginx location 优先级详解:匹配规则、修饰符与完整代码示例
运维·nginx
我命由我123454 小时前
Python 开发 - Python 虚拟环境
运维·开发语言·后端·python·http·https·java-ee
dlhto4 小时前
Windows 使用 Rufus 制作 AlmaLinux 10.2 启动 U 盘:从 ISO 下载到服务器安装
运维·服务器·windows
软件派4 小时前
Beam.Win 自动化办公与业务流程提效指南
运维·自动化