使用前需要安装PHP扩展:pcntl、posix、event,这三个扩展。
请使用Linux系统命令窗口,前往子主题的根目录(前往子主题设置中查看目录),执行命令:
启动命令
php WebsocketStart.php start -d
停止命令:
php WebsocketStart.php stop
出现以下状态表示成功:

然后设置Nginx的伪静态:
location /websocket
{
proxy_pass http://127.0.0.1:8282;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Real-IP $remote_addr;
}