宝塔 利用nginx 设置 workman的wss 反向代理
在配置文件增加以下两部分即可
upstream wss { # 这里的localhost是映射本地服务器,也可以是外网ip,12360端口。 server localhost:12360; }
# websockets location /wss { #Gateway的端口:23460 proxy_pass http://127.0.0.1:23460; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; }