Nginx反向代理WebSocket

http {
 
    upstream websocket {
        server 192.168.1.1:8010;
    }
    server {
        listen 8020;
        location / {
			proxy_pass http://websocket;
			proxy_http_version 1.1;
			proxy_set_header Upgrade $http_upgrade;
			proxy_set_header Connection "upgrade";

        }
    }
}
  

  

posted @ 2018-03-18 16:43  尼玛范爷  阅读(417)  评论(0编辑  收藏  举报