mirror of
https://github.com/thib8956/nginx-proxy
synced 2024-11-25 05:16:30 +00:00
Merge pull request #1338 from mauvm/patch-1
Do not HTTPS redirect Let'sEncrypt ACME challenge
This commit is contained in:
commit
718d45feaf
12
nginx.tmpl
12
nginx.tmpl
@ -246,7 +246,19 @@ server {
|
|||||||
listen [::]:80 {{ $default_server }};
|
listen [::]:80 {{ $default_server }};
|
||||||
{{ end }}
|
{{ end }}
|
||||||
access_log /var/log/nginx/access.log vhost;
|
access_log /var/log/nginx/access.log vhost;
|
||||||
|
|
||||||
|
# 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;
|
return 301 https://$host$request_uri;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user