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; 
		}
}
相关推荐
机核研创社2 小时前
睡裤明橡筋自动化选型指南与落地四步走
运维·自动化
志栋智能2 小时前
超自动化运维,告别复杂系统的新范式
运维·自动化
零基础1232 小时前
Ubuntu 常用命令汇总
linux·运维·开发语言
Android系统攻城狮3 小时前
Linux Gstreamer深度解析之gst_audio_sink_get_type调用流程与实战(六十五)
linux·运维·服务器·音视频·gstreamer音视频·音视频进阶·gstreamer音视频进阶
云贝贝贝4 小时前
PostgreSQL 分区表:从设计到运维,大表不再卡
运维·数据库·postgresql
fengkai45455 小时前
十二、Redis -1
运维·数据库·redis
甜到心里的蛋糕6 小时前
Playwright 无头浏览器自动发布 CSDN 图文草稿的实践(持久化 profile + 图床直传)
运维·python·playwright·爬虫自动化·博客运营
凌云若寒7 小时前
BarTender提示#807错误:无法在拥有其他许可证的Licensing Service上激活节点锁定的 Professional 版许可证 的解决办法
运维·服务器·前端·学习·软件需求
Julien20047 小时前
管理 Ansible 配置文件
linux·运维·服务器·ssh·学习方法
sjg200104147 小时前
websocket基本使用
网络·websocket