如果我手动运行laravel-echo-server-它可以正常工作。但是我无法使用超级用户运行laravel-echo-server:我在前端出现错误
GET http://example.com:6001/socket.io/EIO=3&transport=polling&t=MO25vx0net::ERR_CONNECTION_TIMED_OUT
echoserver.log已创建,但始终为空
我尝试使用sudo重新启动和更新超级用户
/etc/supervisord.conf:
[program:echo-server]
command=/usr/bin/laravel-echo-server start
dierctory=/var/www/www-root/data/www/example.com
autostart=true
user=root
autorestart=true
stdout_logfile=/var/www/www-root/data/www/example.com/storage/logs/echoserver.log
laravel-echo-server.json:
{
"authHost": "http://example.com",
"authEndpoint": "/broadcasting/auth",
"clients": [
{
"appId": "fe0ee01ccace98c",
"key": "1138421388769fdbbf88293eb329c16a"
}
],
"database": "redis",
"databaseConfig": {
"redis": {
"port": "6379",
"host": "localhost"
},
"sqlite": {
"databasePath": "/database/laravel-echo-server.sqlite"
}
},
"devMode": true,
"host": null,
"port": "6001",
"protocol": "http",
"socketio": {},
"sslCertPath": "",
"sslKeyPath": "",
"sslCertChainPath": "",
"sslPassphrase": "",
"subscribers": {
"http": true,
"redis": true
},
"apiOriginAllow": {
"allowCors": false,
"allowOrigin": "",
"allowMethods": "",
"allowHeaders": ""
}
}
答案 0 :(得分:3)
您的directory
配置中有错字。
dierctory=/var/www/www-root/data/www/example.com
^^^
# It should be:
directory=/var/www/www-root/data/www/example.com`
答案 1 :(得分:0)
替换此问题即可解决
command=/usr/bin/laravel-echo-server start
对此
command=/usr/bin/laravel-echo-server start --dir=/var/www/www-root/data/www/example.com