I am using laravel 5.5 for api backend part of application. I am trying to set up working with web-sockets.Can you please tell me why I can not start laravel-echo-server through a proxy? Apache settings
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://localhost:6001/$1 [P,L]
ProxyRequests Off
ProxyPass /socket.io http://localhost:6001/socket.io
ProxyPassReverse /socket.io http://localhost:6001/socket.io
#RewriteEngine on
#RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
#RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
#RewriteRule .* ws://localhost:6001%{REQUEST_URI} [P]
But if you use, not a domain, then everything works well Settings laravel-echo-server.json
{
"authHost": "https://trarchive.it-thematic.ru",
"authEndpoint": "/api/broadcasting/auth",
"clients": [
{
"appId": "7pTuIfhqAZMR9ZIwAAAN",
"key": "77c87b26b45bd770d1ede3cfe3373fd3"
}
],
"database": "redis",
"databaseConfig": {
"redis": {
"port": "6379",
"host": "127.0.0.1",
"keyPrefix": ""
},
"sqlite": {
"databasePath": "/database/laravel-echo-server.sqlite"
}
},
"devMode": true,
"host": null,
"port": "6001",
"protocol": "http",
"socketio": {},
"secureOptions": 67108864,
"sslCertChainPath": "",
"sslPassphrase": "",
"subscribers": {
"http": true,
"redis": true
},
"apiOriginAllow": {
"allowCors": false,
"allowOrigin": "*",
"allowMethods": "*",
"allowHeaders": "*"
}
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire