Answer the question
In order to leave comments, you need to log in
laravel-echo-server not finding redis?
Laravel-echo-server tries to find BD Redis at 127.0.0.1 ip .
But another ip is entered in .env, by which he should look for it
.env
REDIS_HOST=81.161.127.17
REDIS_PASSWORD=null
REDIS_PORT=6379
php artisan config:cache
not help. <?php
$redis = new Redis();
$redis->connect('81.161.127.17');
$redis->set('key', 2);
$value = $redis->get('key');
var_dump($value);
?>
Answer the question
In order to leave comments, you need to log in
Laravel echo server is configured through a separate laravel-echo-server.json file.
In it, you can specify which ip and port to search for redis for it, also with the ability to specify a password.
Config example:
"databaseConfig": {
"redis": {
"host": "127.0.0.1",
"password": "123",
"port": 6379
}
},
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question