$ssl_client_v_end

The variable $ssl_client_v_end contains the end time of the client's SSL connection in seconds since the epoch. — NGINX Core (HTTP)

$ssl_client_v_end NGINX Core (HTTP)

Description

The $ssl_client_v_end variable is available when NGINX is configured to use SSL and allows access to the end time of the client’s SSL session. This timestamp is typically set when the SSL connection is completed, and the client has finished the SSL handshake. The value is expressed as the number of seconds that have elapsed since January 1, 1970 (the Unix epoch). When an SSL connection is established with a client, multiple timestamps are recorded for various events, including the start and end times of the session. The $ssl_client_v_end variable specifically captures the moment when the client’s SSL connection officially ends. This can be useful for logging, analytics, and other purposes where understanding the duration or timing of the SSL connection is critical. Values of this variable are timestamps in the form of Unix time, e.g., a typical value might look like 1682467654, corresponding to a specific date and time in UTC. For scenarios where sessions need to be managed or monitored, this variable assists in tracking the lifecycle of secure communications between client and server, granting insights into when connections are established and wrapped up, which can be particularly useful in high-traffic environments where security performance is of paramount importance.

Config Example

server {
    listen       443 ssl;
    server_name  example.com;

    ssl_certificate      /path/to/cert.pem;
    ssl_certificate_key  /path/to/key.pem;

    location / {
        access_log /var/log/nginx/access.log;
        set $end_time $ssl_client_v_end;
        # additional configuration
    }
}

Subsystem

http

Cacheable

Yes

Contexts

http, server, location, if

Ensure that SSL is properly configured and enabled for the variable to be set; otherwise, it may return an empty value or not be accessible.

This variable can only be used within the contexts that support SSL, such as 'server' or 'location', and will not function in contexts like 'http' if SSL is not configured.