nchan_redis_ssl

The nchan_redis_ssl directive configures SSL options for connections to a Redis server in the Nchan module.

Syntaxnchan_redis_ssl on | off;
Defaultoff
Contextupstream
Arguments1

Description

The nchan_redis_ssl directive is utilized in the Nchan module of NGINX to specify whether SSL should be used for communication with Redis servers. When this directive is set, it establishes a secure SSL connection to the Redis server for pub/sub functionalities, ensuring that data transmitted between NGINX and Redis is encrypted. This is particularly important in scenarios where sensitive data is involved, as it helps protect against eavesdropping and man-in-the-middle attacks.

The directive accepts a single parameter, which is a boolean value. Setting it to 'on' enables SSL encryption, while setting it to 'off' or omitting the directive will default to an unsecured connection. This directive is especially relevant when TSL/SSL configurations such as certificates and keys are also defined, as they must properly accompany the enabling of SSL for full security compliance.

Nchan can operate in several stages, and the nchan_redis_ssl directive can be set within an upstream context, which allows the user to define how NGINX will communicate with multiple backends defined as upstream servers, providing flexibility and scalability as needed for the application's architecture. Users should ensure that the correct SSL settings and certificates are configured in conjunction with this directive for it to function properly.

Config Example

upstream redis_upstream {
    server redis1.example.com:6379;
    server redis2.example.com:6379;
    nchan_redis_ssl on;
}

Ensure that SSL certificates are correctly configured in conjunction with this directive, or it may lead to connection errors.

Not setting this directive when required can expose data to potential threats if Redis is handling sensitive information.

← Back to all directives