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; 
		}
}
相关推荐
uxiang_blog12 小时前
Linux学习之旅8
linux·运维·学习
云计算-Security12 小时前
基于 Kickstart 的 Linux OS CICD 部署(webhook)
运维·自动化·jenkins
虾..12 小时前
Linux 进程等待
linux·运维·服务器
Han.miracle13 小时前
JavaEE-- 网络编程 http请求报头
运维·服务器·网络·网络协议·计算机网络·http
鹿鸣天涯13 小时前
使用VMware Workstation 17虚拟机安装红帽企业版系统RHEL10
linux·运维·服务器
车前端14 小时前
现代 Nginx 优化实践:架构、配置与性能调优
前端·nginx
南棱笑笑生14 小时前
20251129给荣品RD-RK3588开发板跑Rockchip的原厂Buildroot【linux-6.1】系统时适配AP6275P的蓝牙BLE
linux·运维·服务器·rockchip
Brown.alexis14 小时前
docker安装redis7
运维·docker·容器
c***727415 小时前
Linux下PostgreSQL-12.0安装部署详细步骤
linux·运维·postgresql