Nginx服务器:
location /wss {
proxy_pass http://localhost:8282;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
Apache服务器:
ProxyPass /wss ws://localhost:8282/
ProxyPassReverse /wss ws://localhost:8282/
以宝塔nginx为例: