avoid duplicate acme location include in alias
This commit is contained in:
parent
663a79bfa9
commit
70acecaa4f
1 changed files with 2 additions and 0 deletions
|
@ -513,6 +513,7 @@ server {
|
||||||
include /etc/nginx/vhost.d/default;
|
include /etc/nginx/vhost.d/default;
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if not (exists "/etc/nginx/vhost.d/default") }}
|
||||||
# Do not HTTPS redirect Let'sEncrypt ACME challenge
|
# Do not HTTPS redirect Let'sEncrypt ACME challenge
|
||||||
location /.well-known/acme-challenge/ {
|
location /.well-known/acme-challenge/ {
|
||||||
auth_basic off;
|
auth_basic off;
|
||||||
|
@ -521,6 +522,7 @@ server {
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
return 301 https://{{ $first_host }}$request_uri;
|
return 301 https://{{ $first_host }}$request_uri;
|
||||||
|
|
Loading…
Reference in a new issue