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; 
		}
}
相关推荐
huainingning2 小时前
交换机通过ftp下载文件或者传输文件到ftp服务器
运维·服务器·网络
edwarddamon2 小时前
CentOS 7 国内安装 Docker CE(阿里云源)
运维
Championship.23.243 小时前
Linux 3.0 LVDS驱动开发详解
linux·运维·驱动开发·lvds
小池先生3 小时前
Windows服务器如何备份
运维·服务器
风向决定发型丶4 小时前
Shell中的特殊变量
linux·运维·bash
FII工业富联科技服务4 小时前
灯塔工厂用例详解:AR 远程巡检与智能运维闭环落地实践
运维·ar
运维大师5 小时前
【Linux运维极简教程】05-软件包管理
linux·运维·服务器
碎碎念_4926 小时前
前后端分离项目开发规范
nginx·vue·springboot·restful
BerryS3N6 小时前
Cursor+GitOps:AI驱动的自动化运维新范式
运维·人工智能·自动化
刘某的Cloud7 小时前
手工配置nginx的systemd服务
linux·运维·网络·nginx·systemd