Nginx WebSockets 代理实现

没搞过,当时按HTTP配了也没测试,不觉得有问题,后来发现不行,还好浩哥及时指出问题并给出了解决方案,老大确实6。

配置代码如下:

location /wsapp/ {
proxy_pass http://wsbackend;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

以上配置整理自:http://www.oschina.net/translate/websocket-nginx


未经允许不得转载:阿藏博客 » Nginx WebSockets 代理实现

赞 (0) 打赏