Merge pull request #5 from mauvm/patch-1

Do not HTTPS redirect Let'sEncrypt ACME challenge
This commit is contained in:
Constantin 2020-01-23 20:24:07 +01:00 committed by GitHub
commit 4794a6acc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -245,7 +245,19 @@ server {
listen [::]:80 {{ $default_server }};
{{ end }}
access_log /var/log/nginx/access.log vhost;
return 301 https://$host$request_uri;
# Do not HTTPS redirect Let'sEncrypt ACME challenge
location /.well-known/acme-challenge/ {
auth_basic off;
allow all;
root /usr/share/nginx/html;
try_files $uri =404;
break;
}
location / {
return 301 https://$host$request_uri;
}
}
{{ end }}