nchan_redis_tls_server_name

The `nchan_redis_tls_server_name` directive sets the server name used for the TLS connection to a Redis server in Nchan configurations.

Syntaxnchan_redis_tls_server_name server_name;
Defaultnone
Contextupstream
Arguments1

Description

The nchan_redis_tls_server_name directive is specifically designed for use in Nginx configurations that connect to Redis servers over TLS. This directive allows the specification of a server name for the TLS connection, which is essential for certificate verification during the SSL handshake process. By providing a name, the Nchan module can ensure that it only establishes connections with Redis servers that possess the correct SSL/TLS certificate, thus enhancing the security of data transfers. This capability is particularly useful in production environments where maintaining secure data channels is critical.

This directive expects a single argument, which must be a valid server name. When defining the directive, users should ensure that the provided name matches the Common Name (CN) or Subject Alternative Name (SAN) specified in the Redis server's SSL certificate. If the name specified does not match the certificate, Nginx will reject the TLS connection, preventing potential security issues from occurring. Therefore, proper configuration and validation of server names are paramount to maintaining both the functionality and security of the Redis connection within Nchan setups.

Config Example

upstream redis_backend {
    server redis.example.com:6379;
    nchan_redis_tls_server_name redis.example.com;
}

Ensure the server name matches the CN/SAN in the Redis server's SSL certificate to avoid connection issues.

This directive is only applicable when using Nchan with Redis over TLS; using it without TLS will have no effect.

← Back to all directives