From 1a2dabd0e93f14b2081a599c1d92746a1558610e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szekeres=20Ba=CC=81lint?= Date: Fri, 23 Feb 2018 00:20:21 +0100 Subject: [PATCH] Let's Encrypt fixes --- public/templates/conf/example.com.conf.html | 60 ++++++++++----------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/public/templates/conf/example.com.conf.html b/public/templates/conf/example.com.conf.html index 50737eb..b82d93c 100644 --- a/public/templates/conf/example.com.conf.html +++ b/public/templates/conf/example.com.conf.html @@ -13,15 +13,13 @@ server { ✔ HTTPS --> - # SSL certificate + # SSL + include _ssl.conf; ssl_certificate {{ sslCertificate() }}; ssl_certificate_key {{ sslCertificateKey() }}; - ssl_trusted_certificate /etc/letsencrypt/live/{{ domain() }}/fullchain.pem; - - # SSL config - include _ssl.conf; @@ -40,9 +38,6 @@ server { - ✔ modularized && ✔ Let's Encrypt --> - include _letsencrypt.conf; include _general.conf; - - - # SSL certificate + # SSL + include _ssl.conf; ssl_certificate {{ sslCertificate() }}; ssl_certificate_key {{ sslCertificateKey() }}; - ssl_trusted_certificate /etc/letsencrypt/live/{{ domain() }}/fullchain.pem; - - # SSL config - include _ssl.conf; - include _letsencrypt.conf; - - + ssl_trusted_certificate /etc/letsencrypt/live/{{ domain() }}/fullchain.pem; # disable access_log access_log off; - # SSL certificate + # SSL + include _ssl.conf; ssl_certificate /etc/letsencrypt/live/{{ domain() }}/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/{{ domain() }}/privkey.pem; - ssl_trusted_certificate /etc/letsencrypt/live/{{ domain() }}/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/{{ domain() }}/privkey.pem; + ssl_trusted_certificate /etc/letsencrypt/live/{{ domain() }}/fullchain.pem; return 301 https://{{ isWWW() ? 'www.' : '' }}{{ domain() }}$request_uri; } + + include _letsencrypt.conf; + + + + location / { + return 301 https://{{ isWWW() ? 'www.' : '' }}{{ domain() }}$request_uri; + } + + return 301 https://{{ isWWW() ? 'www.' : '' }}{{ domain() }}$request_uri; }