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; 
		}
}
相关推荐
考虑考虑23 分钟前
tcpdump指令
运维·后端·自动化运维
无奈笑天下3 小时前
Linux上kdump故障标准处理流程
linux·运维·服务器·github
Csvn3 小时前
Nginx 性能调优与压测:连接账本、找拐点与调优前后对比
后端·nginx
鹤落晴春6 小时前
【MySQL】 | 两阶段提交、主从复制
运维·数据库·mysql
瑞雪兆丰年兮7 小时前
Linux快速入门 第四章 Linux系统常用操作技巧
linux·运维·服务器
无足鸟ICT8 小时前
【RHCA+】介绍proc
linux·运维·服务器
Decay__12 小时前
PostgreSQL 用户权限与安全 —— 角色体系、GRANT 授权、pg_hba.conf 认证、行级安全与审计
运维·数据库·sql·postgresql
fengkai454513 小时前
Python运维实战
运维·开发语言·python·ssh·sftp·paramiko
那明眸似水14 小时前
LVS高可用负载均衡集群部署实训
运维·负载均衡·lvs
MSTcheng.14 小时前
【LinuxIO篇】Linux学习第二十三弹——fopen和open有什么区别?从 FILE* 到 fd,讲透 Linux 文件 IO
linux·运维·学习·io·系统调用·fd