I'm using socket.io and laravel echo server with Redis and also SSL installed on the server but the socket.io file is not loading on the production ubuntu server everything works fine in my local window I'm not sure if I need any other configurations for production I also allow UFW 6001 port. getting (failed)net::ERR_CONNECTION_TIMED_OUT error on console I attached console browser screenshot
this is my laravel-echo-server.json file.
{
"authHost": "https://flowerful.initialengine.com",
"authEndpoint": "/broadcasting/auth",
"clients": [
{
"appId": "bb6e18dd7fd2e7aa",
"key": "c52b04fae249d3cb303b317b281b1599"
}
],
"rejectUnauthorized": false,
"database": "redis",
"databaseConfig": {
"redis": {},
"sqlite": {
"databasePath": "/database/laravel-echo-server.sqlite"
}
},
"devMode": true,
"host": null,
"port": "3001",
"protocol": "https",
"socketio": {},
"secureOptions": 67108864,
"sslCertPath": "/etc/letsencrypt/live/flowerful.initialengine.com/fullchain.pem",
"sslKeyPath": "/etc/letsencrypt/live/flowerful.initialengine.com/privkey.pem",
"sslCertChainPath": "",
"sslPassphrase": "",
"subscribers": {
"http": true,
"redis": true
},
"apiOriginAllow": {
"allowCors": true,
"allowOrigin": "https://flowerful.initialengine.com",
"allowMethods": "GET, POST",
"allowHeaders": "Origin, Content-Type, X-Auth-Token, X-Requested-With, Accept, Authorization, X-CSRF-TOKEN, X-Socket-Id"
}
}
I search on different portals and get some help and I apply some things following.
laravel-echo-server init
and create a config fileSome things in my mind may be happening. I installed virtual host may be apache2 not allow the domain to run on 6001 port
the URL is that is not working.
https://flowerful.initialengine.com:6001/socket.io/?EIO=3&transport=polling&t=NLFfgwB
I think this is because laravel-echo-server is only listening on loopback interface.
You should try setting "host" to 0.0.0.0 instead of null.
Like this..
"host": "0.0.0.0"
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community