配置文件中添加如下行:
1 2 3 4 5 6 7 8 9 10 11 12
| server { ... location /wsapp/ { proxy_pass http: # proxy websocket reverse proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } ... }
|
References:
[1]NGINX as a WebSocket Proxy
===
[erq]