workermna配置wss服务,注意通过宝塔的配置

1,apache

<VirtualHost *:443>
    ServerAdmin webmasterexample.com
    DocumentRoot "/www/wwwroot/daan163.com/"
    ServerName SSL.daancity.com
    ServerAlias www.daancity.com daancity.com 
    errorDocument 404 /404.html
    ErrorLog "/www/wwwlogs/daancity.com-error_log"
    CustomLog "/www/wwwlogs/daancity.com-access_log" combined
    
    #SSL
    SSLEngine On
    SSLCertificateFile /etc/letsencrypt/live/daancity.com/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/daancity.com/privkey.pem
    SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
    SSLProtocol All -SSLv2 -SSLv3
    SSLHonorCipherOrder On
    
  
    
# Proxy Config
SSLProxyEngine on

ProxyRequests Off
ProxyPass /wss ws://127.0.0.1:8071
ProxyPassReverse /wss ws://127.0.0.1:8071

 

 

如果是apache的8072多群

# Proxy Config
SSLProxyEngine on

ProxyRequests Off
ProxyPass /wss2 ws://127.0.0.1:8072
ProxyPassReverse /wss2 ws://127.0.0.1:8072

 

注意php版本要取消某些函数的禁用

pcntl_fork   /  pcntl_signal_dispatch  /  pcntl_wait  /  pcntl_signal  /  pcntl_alarm

 

看云在线文档:https://www.kancloud.cn/bluestear/mdkeji_chat/1413237

多群版关闭ws
cd /www/wwwroot/www.mdkeji.cn/addons/mdkeji_chat/extend/Workerman-master/ && php start.php stop

多群版启动ws
cd /www/wwwroot/www.mdkeji.cn/addons/mdkeji_chat/extend/Workerman-master/ && php start.php start -d

 

 

2,nginx

  location /wss
  {
    proxy_pass http://127.0.0.1:8071;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header X-Real-IP $remote_addr;
  }
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

sunphp开发者

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值