diff --git a/CHANGELOG.md b/CHANGELOG.md index a92ddc8c..53feb52e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,8 @@ The **patch** part changes incrementally at each release. ### Fixed +* certbot: restore compatibility with old Nginx + ### Removed ### Security diff --git a/certbot/templates/acme-challenge/nginx.conf.j2 b/certbot/templates/acme-challenge/nginx.conf.j2 index a0730f3c..e4d3244b 100644 --- a/certbot/templates/acme-challenge/nginx.conf.j2 +++ b/certbot/templates/acme-challenge/nginx.conf.j2 @@ -1,5 +1,9 @@ location ~ /.well-known/acme-challenge { +{% if ansible_distribution == "Debian" and ansible_distribution_major_version is version('8', '<=') %} + alias {{ certbot_work_dir }}/.well-known/acme-challenge; +{% else %} alias {{ certbot_work_dir }}/; +{% endif %} try_files $uri =404; allow all; }