HTTP directives

ssl directive (HTTP, historical)

Legacy server-wide switch. Obsolete since 1.15.0; removed in 1.25.1. Replace it with the ssl parameter on each intended TLS listening socket. Do not accidentally enable TLS on a plaintext listener. Context: http, server. Documented default: off (historical). Version: obsolete 1.15.0; removed 1.25.1. Historical only; removed in 1.25.1. Partial configuration for an isolated synthetic lab; not a production policy.

Formal Syntax & Structure

nginx syntaxnginx
ssl on | off;

Parameters & Attributes

NameTypeDescription
stateon | offHistorical switch only; use listen with ssl in modern configurations.

Working Example

Example Snippetnginx
# Historical (do not run on modern Nginx): ssl on;# Modern replacement inside server:listen 127.0.0.1:19777 ssl;ssl_certificate certs/lab.pem;ssl_certificate_key certs/lab.key;
Nginx Reference