server {
   listen 443;

   location / {
      root /opt/docs/doxygen;
   }

   # Enable Gzip. Based on:
   # https://github.com/darktable/html5-boilerplate-server-configs/blob/a164643fdafb42523bc943995bfe710e1baa5d75/nginx.conf#L63-L90
   gzip  on;
   gzip_http_version 1.0;
   gzip_comp_level 2;
   gzip_min_length 1100;
   gzip_buffers     4 8k;
   gzip_proxied any;
   gzip_types
     # text/html is always compressed by HttpGzipModule
     text/css
     text/javascript
     text/xml
     text/plain
     text/x-component
     application/javascript
     application/x-javascript
     application/json
     application/xml
     application/rss+xml
     font/truetype
     font/opentype
     application/vnd.ms-fontobject
     image/svg+xml;

   gzip_static on;

   gzip_proxied        expired no-cache no-store private auth;
   gzip_disable        "MSIE [1-6]\.";
   gzip_vary           on;


   # Enable SSL.
   ssl on;
   ssl_certificate /etc/nginx/ssl/zooxlabs_wildcard.crt;
   ssl_certificate_key /etc/nginx/ssl/zooxlabs_wildcard.key;

   ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
   ssl_prefer_server_ciphers on;
   ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
   ssl_ecdh_curve secp384r1; # Requires nginx >= 1.1.0
   ssl_session_cache shared:SSL:10m;
   #ssl_session_tickets off; # Requires nginx >= 1.5.9
   ssl_stapling on; # Requires nginx >= 1.3.7
   ssl_stapling_verify on; # Requires nginx => 1.3.7
   add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
   add_header X-Content-Type-Options nosniff;
}

# Require https.
server {
   listen 80;
   return 301 https://$host$request_uri;
}
