我无法让主管在我的Ubuntu 16.04 AWS EC2实例上运行laravel echo服务器,但它在我的Homestead Ubuntu 16.04 VM上运行正常。我得到的错误是找不到命令' / usr / bin / laravel-echo-server。如果我直接cd到/usr/bin
并运行laravel-echo-server start
,它就会以开发模式启动
我正在运行节点V8.9.1
这是我的配置文件中的内容
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)04d
command=/usr/bin/laravel-echo-server start --dir=/var/www/html/bcbAPI
autostart=true
autorestart=true
user=root
redirect_stderr=true
stdout_logfile=/var/www/html/bcbAPI/storage/logs/echoserver.log
stderr_logfile=/var/www/html/bcbAPI/storage/logs/echoserver-error.log
laravel回波-server.json
{
"authHost": "http://myip.com/b3",
"authEndpoint": "/broadcasting/auth",
"clients": [
{
"appId": "aa41c60c83ffa7f7",
"key": "70e24d91c54f9f30d1fbdb2ed3f2cce8"
}
],
"database": "redis",
"databaseConfig": {
"redis": {
"port": "6379",
"host": "localhost"
},
"sqlite": {
"databasePath": "/database/laravel-echo-server.sqlite"
}
},
"devMode": true,
"host": null,
"port": "6001",
"protocol": "http",
"socketio": {
"wsEngine": "uws"
},
"sslCertPath": "",
"sslKeyPath": "",
"sslCertChainPath": "",
"sslPassphrase": "",
"apiOriginAllow": {
"allowCors": true,
"allowOrigin": "myiphere/b2",
"allowMethods": "GET,POST,PUT",
"allowHeaders": "Origin, Content-Type, X-Auth-Token, X-Requested-With, Accept, Authorization, X-CSRF-TOKEN, X-Socket-Id"
}
}
答案 0 :(得分:0)
在进行所有操作之前,请检查 NodeJS 和 laravel-echo-server 的绝对路径:
which node
which laravel-echo-server
在您的命令中添加nodejs和laravel-echo-server PATH 之后:
command=/bin/node /bin/laravel-echo-server start --dir=YOUR_ABSOLUTE_PROJECT_PATH
问题解决了!