我无法让主管在我的Ubuntu 16.04 AWS EC2实例上运行laravel回显服务器,但它在我的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-echo-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"
}
}
在开始之前,请检查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
问题已解决!