nginx 如何配置 wss协议啊
nginx 如何配置 wss协议啊,已经开启了HTTPS协议 nginx 1.3+版本以上就支持websocket了,https虚拟主机配置中添加如下配置location /wss
{
proxy_pass http://127.0.0.1:8282;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Real-IP $remote_addr;
}里面后端websocket服务的127.0.0.1:8282自行调整
https://你域名/wss 进行调用
页:
[1]