Nginx - Https configuration


This article shows you how to configure SSL (https) for the nginx web server


You should know the basic of SSL for a server: How to enable SSL on a server (ie HTTPS on a web server) ?.


When you got:

  • your certificate
  • and the private key

you can configure it 1) like that inside a server block

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


Powered by ComboStrap