nginx反向代理websocket
创始人
2025-07-09 12:30:40
0

location / {

  proxy_pass http://10.110.21.22:9501;  //注意不是ws://。代理ws://用http://;代理wss://用https://

  proxy_http_version 1.1;

  proxy_set_header Upgrade $http_upgrade;

  proxy_set_header Connection "Upgrade";

  proxy_connect_timeout 4s;

  proxy_read_timeout 60s;  //设置保持websocket长连接的时间

  proxy_send_timeout 12s;

}

上一篇:mysql临时表的使用

下一篇:mysql常用函数

相关内容

热门资讯

vcenter因证书问题无法上... 解决方法:导入root CA证书。主要操作步骤如下:1、下载root CA证书,并解压。2、右击5a...
centos7支持中文 1、使用locale命令查看当前使用的语言2、使用locale -a 查看安装的语言包,如果没有中文...
centos7 LVM(逻辑卷... 一、LVM简介 LVM是 Logical Volume Manager(逻辑卷管理)的简写,它...
mariadb galera ... mariadb server下载地址:https://mariadb.org/download/?...
rockylinux9下安装p... 1、更新系统软件包dnf update2、安装PostgreSQLdnf install postg...
nginx配置实例:只允许内部... #配置清单location / { deny 192.168.1.1; ...
rockylinux 9中安装... 1、开启ipv4内核转发vi /etc/sysctl.conf,加入:net.ipv4.ip_for...
mysql用户管理 1、新建用户create user username@host identified by 'pa...
win10远程桌面出现身份验证... win10远程桌面出现身份验证错误。要求的函数不受支持解决:打开组策略gpedit.msc,依次展开...
winddows使用syspr... 1、查看sidwhoami /user2、使用sysprep重新生成sid运行如下命令:打开“系统准...