💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# :-: 客服插件的配置 客服配置需开启workerman服务。 准备工作: 1. 配置数据库连接 2. 语言环境PHP7.1及以上(建议使用7.2) 3. 其他注意: ##### 函数被禁用的问题disable 请在php配置里,解除禁用以下函数 pcntl\_signal\_dispatch pcntl\_wait pcntl\_alarm pcntl\_signal pcntl\_fork ### 数据库配置 #### (V4.0.4) 客服需要单独配置数据库 文件路径:addon/servicer/gateway/Applications/Service/Events.php ![](https://img.kancloud.cn/0f/0d/0f0d54d98872b57d15f2d9b09321ae8d_1000x931.png) ### 配置wss ##### nginx服务器配置 在虚拟主机配置中加入如下配置 location /wss { #代理到上面的地址去,格式:http://域名:端口号,    proxy\_pass http://127.0.0.1:8282;     proxy\_http\_version 1.1;    proxy\_set\_header Upgrade $http\_upgrade;    proxy\_set\_header Connection "Upgrade"; } 配置如下 ![](https://img.kancloud.cn/69/db/69db9c58bd41c483881207a872ca961a_1437x914.png) ##### 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:8282 #服务器+端口号 ProxyPassReverse /wss wss://127.0.0.1/wss #客户端的域名 配置如下: ![](https://img.kancloud.cn/d4/70/d4705c2872617ab12e0e0192961abf49_1284x918.png) ### 服务常用操作 ##### 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 ##### Window系统 开启服务 双击/addon/servicer/gateway目录下的bat文件start\_for\_win.bat