Aller au contenu principal

nginx-nikola.conf (Source)

server {
   listen [::]:443 ssl;
   listen 443 ssl;
   ssl_certificate /etc/letsencrypt/live/MyNDD/fullchain.pem; # managed by Certbot
   ssl_certificate_key /etc/letsencrypt/live/MyNDD/privkey.pem; # managed by Certbot
   include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
   ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
   server_name MyNDD;
   # Set the root directory of your blog
   root /var/www/blog/output;
   location / {
      # Serve a .gz version if it exists
      gzip_static on;
      # Try to serve the clean url version first
      try_files $uri.htm $uri.html $uri $uri/index.html =404;
   }
   # Set your favicon
   location = /icon.png {
      # This never changes, so don't let it expire
      expires max;
   }
}
# Enable SSL session caching for improved performance
ssl_session_cache shared:ssl_session_cache:10m;
server {
   listen 80;
   listen [::]:80;
   server_name MyNDD;
   return 302 https://MyNDD$request_uri;
}