From 70acecaa4f40b5239002349278dd7f8a771a07a9 Mon Sep 17 00:00:00 2001 From: Hannes Happle Date: Fri, 31 Jul 2020 15:09:30 +0200 Subject: [PATCH] avoid duplicate acme location include in alias --- nginx.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nginx.tmpl b/nginx.tmpl index 1f8c926..2f7fde2 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -513,6 +513,7 @@ server { include /etc/nginx/vhost.d/default; {{ end }} + {{ if not (exists "/etc/nginx/vhost.d/default") }} # Do not HTTPS redirect Let'sEncrypt ACME challenge location /.well-known/acme-challenge/ { auth_basic off; @@ -521,6 +522,7 @@ server { try_files $uri =404; break; } + {{ end }} location / { return 301 https://{{ $first_host }}$request_uri;