请选择 进入手机版 | 继续访问电脑版

图文精华

cloudtalk3.0

【cloudtalk】通过宝塔bt nginx 代理实现websokcet wss服务

宝塔nginx配置方法如下:

在站点的配置文件中 server 节点上面添加如下内容

  1. map $http_upgrade $connection_upgrade {
  2. default upgrade;
  3. '' close;
  4. }
  5. upstream websocket {
  6. server 域名:端口;
  7. }
复制代码

------------------------------------------------分割------------------------------------------------
找到配置文件中的 #SSL-END 在后面添加如下内容

  1. #wss协议转发
  2. location /wss {
  3. proxy_pass http://127.0.0.1:9326;
  4. proxy_http_version 1.1;
  5. proxy_set_header Upgrade $http_upgrade;
  6. proxy_set_header Connection "Upgrade";
  7. }
复制代码

------------------------------------------------分割------------------------------------------------
最后保存文件,一般情况下会生效,如果 没有生效,重启nginx
标签: 暂无标签
admin

写了 5 篇文章,拥有财富 73,被 1 人关注

分享分享
回复

使用道具

您需要登录后才可以回帖 登录 | 立即注册
B Color Link Quote Code Smilies

0

主题

1

帖子

4

积分

新手上路

Rank: 1

积分
4
Jerryleart  新手上路 | 发表于 2022-6-15 18:45:36

Logopod

aspectmontage.com MAReplacement
newton
Company Instalation company Aspectmontage MA
Reinstallation   Windows Replacement
newton
Submit your application in the best installation organization of the Northeast coast of USA
回复

使用道具

返回顶部