Php Laravel Echo服务器和网络::错误\u SSL\u协议\u https版本错误
我在我的nginx服务器上使用的是laravel5.8,带有laravelecho服务器、socket.io和redis 我的网站一直工作到昨天,没有出现任何错误,但今天它给了我套接字错误,例如:Php Laravel Echo服务器和网络::错误\u SSL\u协议\u https版本错误,php,laravel,nginx,redis,socket.io,Php,Laravel,Nginx,Redis,Socket.io,我在我的nginx服务器上使用的是laravel5.8,带有laravelecho服务器、socket.io和redis 我的网站一直工作到昨天,没有出现任何错误,但今天它给了我套接字错误,例如: GET https://example.com:6001/socket.io/?EIO=3&transport=polling&t=NHtNFvZ net::ERR_SSL_PROTOCOL_ERROR 这是我的laravel-echo-server.json文件: { &q
GET https://example.com:6001/socket.io/?EIO=3&transport=polling&t=NHtNFvZ net::ERR_SSL_PROTOCOL_ERROR
这是我的laravel-echo-server.json文件:
{
"authHost": "http://localhost:8000",
"authEndpoint": "/broadcasting/auth",
"clients": [
{
"appId": "123",
"key": "123"
}
],
"database": "redis",
"databaseConfig": {
"redis": {
"port": "6379",
"host": "127.0.0.1"
},
"sqlite": {
"databasePath": "/database/laravel-echo-server.sqlite"
}
},
"devMode": true,
"host": null,
"port": "6001",
"protocol": "http",
"socketio": {},
"sslCertPath": "",
"sslKeyPath": "",
"sslCertChainPath": "",
"sslPassphrase": "",
"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"
}
}
首先我遇到了ERR\u CRT\u DATE\u INVALID
错误,但后来遇到了ERR\u SSL\u PROTOCOL\u error
我已使用sudo supervisorctl重新启动echo服务器重新启动了echo worker:,但仍然存在相同的问题。最终我已解决了此问题 我补充说:
“authHost”:https://localhost:8000“,
“协议”:“https”,
“sslCertPath”:“/etc/letsencrypt/live/example.com/fullchain.pem”,
“sslKeyPath”:“/etc/letsencrypt/live/example.com/privkey.pem”,
在我的laravel-echo-server.json文件中,使用sudo-supervisortl restart-echo-server:
这可能对将来的人有所帮助