nginx 反向代理ws

2019-01-28 16:16:04   php分享记录

 

  1. upstream wsbackend {
  2. server 127.0.0.1:8080;
  3. server 127.0.0.1:8081;
  4. }
  5. server {
  6. listen 5067;
  7. server_name ws.52itstyle.com;
  8. location / {
  9. proxy_pass http://wsbackend;
  10. proxy_http_version 1.1;
  11. proxy_set_header Upgrade $http_upgrade;
  12. proxy_set_header Connection "upgrade";
  13. }
  14. }