1
0
mirror of https://github.com/nginx-proxy/nginx-proxy synced 2024-09-27 22:49:53 +02:00

Merge pull request #1338 from mauvm/patch-1

Do not HTTPS redirect Let'sEncrypt ACME challenge
This commit is contained in:
Jason Wilder 2020-02-09 13:31:42 -07:00 committed by GitHub
commit 718d45feaf
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -246,7 +246,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 }}