FreeABC
记忆重叠

nginx 反向代理workerman websocket 配置 完美版

upstream wsbackend {
    server 192.168.0.2:7272;
}

server {
    listen       443;
    server_name  b.abczn.com;

    ssl     on;
    ssl_certificate   /www/web/214003886080233.pem;
    ssl_certificate_key  /www/web/214003886080233.key;
    ssl_session_timeout     5m;
    ssl_ciphers     ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
    ssl_protocols   TLSv1 TLSv1.1   TLSv1.2;
    ssl_prefer_server_ciphers   on;

    location / {
        proxy_pass http://wsbackend;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-real-ip $remote_addr;
    }
}

 

配置说明:

192.168.0.2   workerman 内网IP

 

有问题可以联系我QQ185291445

或者加入我们的技术讨论群:307469859

 

未经允许不得转载:Free-Abc智能 » nginx 反向代理workerman websocket 配置 完美版
分享到: 更多 (0)