首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >Ngxin下配置websocket

Ngxin下配置websocket

作者头像
零云
发布于 2023-07-24 21:12:09
发布于 2023-07-24 21:12:09
8800
举报

那么ngxin是支持http和websocket公用443端口的,比如你有一个网站https://jiangruyi.com,同时你需要配置一个wss://jiangruyi.com的websocket接口,可以参考一下配置:

代码语言:javascript
复制
    # 代理socket
    location /wss {
        proxy_pass http://127.0.0.1:9508;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header X-Real-IP $remote_addr;
    }
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2019-09-04 ,如有侵权请联系 cloudcommunity@tencent.com 删除
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档