fix nginx acme challenge location

master
HgO 2020-12-26 14:40:54 +01:00
parent 398d08cc12
commit 7f7079db9e
1 changed files with 2 additions and 2 deletions

View File

@ -8,10 +8,10 @@ server {
return 301 https://$host$request_uri; return 301 https://$host$request_uri;
} }
{% if acme_enabled and acme_challenge_dir is defined %} {% if acme_enabled %}
location ^~ /.well-known/acme-challenge/ { location ^~ /.well-known/acme-challenge/ {
allow all; allow all;
root {{ acme_challenge_dir }}; alias {{ acme_config.challenge_dir + (acme_config.challenge_dir.endswith('/') | ternary('', '/')) }};
try_files $uri =404; try_files $uri =404;
} }
{% endif %} {% endif %}