Nginx - Https configuration

About

Certificate for a Website - Web server (Https configuration) in Nginx

An https configuration:

  • changes the port
  • and gives the certificate / private keys

inside a server block

Example

http {
    ssl_session_cache   shared:SSL:10m;
    ssl_session_timeout 10m;
    
    server {
        listen              443 ssl;
        server_name         www.example.com; # the uri
        ssl_certificate     www.example.com.crt; # the certificate (public)
        ssl_certificate_key www.example.com.key; # the private key
        ssl_protocols       TLSv1 TLSv1.1 TLSv1.2; # the ssl version
        ssl_ciphers         HIGH:!aNULL:!MD5; # the ciphers
        ...
    }
    
}

where:

Documentation / Reference


Powered by ComboStrap