nginx 反向代理 websocket

upstream webacked{
     server 127.0.0.1:9505; #目标服务器websockt地址
}
server {
# 监听当前服务器端口 listen
9888; location / { proxy_pass http://webacked; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }

 

posted @ 2021-04-15 09:21  php的自我修养  阅读(164)  评论(0编辑  收藏  举报