HTTP SSL directives
ssl_protocols directive
HTTP or server context. Selects allowed protocol versions; default TLSv1.2 TLSv1.3 in current docs (TLS 1.3 default since 1.23.4). Prefer HTTP-level policy for shared listeners. Old protocol tokens are historical, not recommendations. TLS 1.3 support needs Nginx 1.13.0+ and OpenSSL 1.1.1+.
Formal Syntax & Structure
nginx syntaxnginx
ssl_protocols [SSLv2] [SSLv3] [TLSv1] [TLSv1.1] [TLSv1.2] [TLSv1.3];Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| protocol | TLS protocol token (repeatable) | Enable supported versions. TLSv1.2 and TLSv1.3 are the recommended modern baseline; historical tokens not recommendations. |
Working Example
Example Snippetnginx
ssl_protocols TLSv1.2 TLSv1.3;