nginx反向代理 websocket

2020-04-04  本文已影响0人  东京的雨不会淋湿首尔

nginx 反向代理 websocket

upstream homeland{ 
  # The keepalive parameter sets the maximum number of idle keepalive connections
  # to upstream servers that are preserved in the cache of each worker process. When
  # this number is exceeded, the least recently used connections are closed.
  #    keepalive 100;
      ip_hash; 
      server 123.207.64.210:8003; 

}

location  /cable {
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $host;

      proxy_pass http://homeland;

      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
}

上一篇 下一篇

猜你喜欢

热点阅读