客服配置需开启workerman服务。 1.准备工作 配置数据库连接 语言环境PHP7.1及以上(建议使用7.2) 其他注意: 函数被禁用的问题disable 请在php配置里,解除禁用以下函数 pcntl_signal_dispatch pcntl_wait pcntl_alarm pcntl_signal pcntl_fork
2.数据库配置(V4.0.4) 客服需要单独配置数据库 文件路径:addon/servicer/gateway/Applications/Service/Events.php 如果服务运行后,需要更改数据库配置,则在配置更新后,重新启动workerman服务  3.配置wss nginx服务器配置 在虚拟主机配置中加入如下配置
location /wss {
proxy_pass http:
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
配置如下 
apache服务器配置
在httpd.conf文件中,启用 proxy_wstunnel_module 模块
LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
在ssl.conf文件中,配置SSL及代理 #WSS ProxyRequests Off ProxyPass /wss ws://127.0.0.1:8292 #服务器+端口号 ProxyPassReverse /wss wss://127.0.0.1/wss #客户端的域名
配置如下: 
4.Workerman常用命令 Linux系统
将 [PHP路径] 和 [项目路径] 替换为实际目录路径 开启服务
[PHP路径]/bin/php [项目路径]/addon/servicer/gateway/start.php start -d
例:/www/server/php/72/bin/php /www/wwwroot/b2b2c.niushop.cn/addon/servicer/gateway/start.php start -d
停止服务
[PHP路径]/bin/php [项目路径]/addon/servicer/gateway/start.php stop
例:/www/server/php/72/bin/php /www/wwwroot/b2b2c.niushop.cn/addon/servicer/gateway/start.php stop
服务状态
[PHP路径]/bin/php [项目路径]/addon/servicer/gateway/start.php status
例:/www/server/php/72/bin/php /www/wwwroot/b2b2c.niushop.cn/addon/servicer/gateway/start.php status
5.多个项目在同一服务器上的客服配置
如果一个服务器上,需要部署多个项目,并且开启客服服务的话,需要对端口和服务名进行更改,并且重启Workerman服务。 总体来说,注册服务端口共更改5个位置,ws服务端口共更改2个位置,内部通讯端口共更改1个位置,服务名共更改2处(两个名字不能相同) 同一项目注册服务端口、ws服务端口必须一致   具体文件更改位置 addon/servicer/gateway/Applications/Service/start_businessworker.php  addon/servicer/gateway/Applications/Service/start_gateway.php  addon/servicer/config/gateway_client.php  addon/servicer/gateway/Applications/Service/start_register.php  addon/servicer/servicer/controller/Login.php  addon/servicer/api/controller/Chat.php 
|