laravel - Laravel 回显服务器无法启动
问题描述
Laravel 回显服务器failed
在我的服务器上不断返回状态
代码
laravel-echo-server.json
{
"authHost": "http://example.com",
"authEndpoint": "/broadcasting/auth",
"clients": [
{
"appId": "311dr094tf98745ce",
"key": "fa43bffb3rth63f5ac9c386916ae28e6"
}
],
"database": "redis",
"databaseConfig": {
"redis": {},
"sqlite": {
"databasePath": "/database/laravel-echo-server.sqlite"
}
},
"devMode": false,
"host": null,
"port": "6001",
"protocol": "http",
"socketio": {},
"secureOptions": 67108864,
"sslCertPath": "",
"sslKeyPath": "",
"sslCertChainPath": "",
"sslPassphrase": "",
"subscribers": {
"http": true,
"redis": true
},
"apiOriginAllow": {
"allowCors": true,
"allowOrigin": "http://localhost:80",
"allowMethods": "GET, POST",
"allowHeaders": "Origin, Content-Type, X-Auth-Token, X-Requested-With, Accept, Authorization, X-CSRF-TOKEN, X-Socket-Id"
}
}
echo-pm2.json
{
"name": "echo",
"script": "laravel-echo-server.json",
"args": "start"
}
然后我运行pm2 start echo-pm2.json
并且状态是online
但是当我访问我的网页时我不断得到
GET https://www.example.com:6001/socket.io/?EIO=3&transport=polling&t=NA2SNHk net::ERR_TIMED_OUT
任何想法?
解决方案
"authHost": "http://example.com"
我将此设置为我的本地主机的 url,不确定它是否对您有帮助
推荐阅读
- javascript - 谁能告诉我为什么地图大小为零?
- html - 如何使用 HTML/CSS 在网页中制作斜线?
- python - 从另一个文件模拟本地函数
- javascript - 如何通过单击随机更改按钮的背景颜色?
- svelte - 如何在 Svelte 中使用 TypeitJs?
- ios - 为什么IOS中的请求返回成功错误(未知错误)?
- react-native - 渲染不是一个函数 facebook 广告
- function - 如何在 servicenow 中正确使用函数字段的“glidefunction:concat”?
- node.js - 如果这个nodejs rest api正常并且它的mongoose结构和mongodb数据,为什么我会从mongoDB获得空值?
- kotlin-coroutines - kotlin协程,coroutineScope和withContext有什么区别