nginx websocket proxy

2021-06-17 08:02

阅读:565

标签:pst   proxy   listen   head   upgrade   list   str   location   127.0.0.1   

map $http_upgrade $connection_upgrade {
    default upgrade;
    ‘‘ close;
}
upstream websocket {
    server 127.0.0.1:2346;
}
server {
        listen              80 default;
       。。。。。
        location = /socket.php {
            proxy_pass http://websocket;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        }

}

  

nginx websocket proxy

标签:pst   proxy   listen   head   upgrade   list   str   location   127.0.0.1   

原文地址:http://www.cnblogs.com/allenhaozi/p/7267488.html


评论


亲,登录后才可以留言!