lundi 26 juin 2023

Enable tls for phpredis configuration in laravel 5.6 application

the error shows that something like

[2023-06-27 13:51:56] dev.ERROR: read error on connection to {"exception":"[object] (RedisException(code: 0): read error on connection to /var/www/adflow2/webapp/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php:69)

am currently using this configuration in config/database.php file. but it doesn't enable tls in aws.

    'redis' => [
        'client' => 'phpredis',

        'default' => [
            'scheme' => 'tls',
            'host' => env('REDIS_HOST', '127.0.0.1'),
            'password' => env('REDIS_PASSWORD', null),
            'port' => env('REDIS_PORT', 6379),
            'database' => env('REDIS_DB', 0),
         
        ],
        'session' => [
            'scheme' => 'tls',
            'host' => env('REDIS_HOST', '127.0.0.1'),
            'password' => env('REDIS_PASSWORD', null),
            'port' => env('REDIS_PORT', 6379),
            'database' => env('REDIS_SESSION_DB', 1), // Use a different Redis database for session
         
        ],
    ],

also restart the server after making changes.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/xoQgLJN
via IFTTT

Aucun commentaire:

Enregistrer un commentaire