service-nginx: move ACME hostname to variable and set resolver because nginx will fail if host is not (yet) reachable during startup

This commit is contained in:
Julian Labus 2018-08-07 09:27:02 +02:00
parent d4a4f576c9
commit 30b5a5e4eb
No known key found for this signature in database
GPG key ID: 8AF209F2C6B3572A

View file

@ -1,5 +1,7 @@
location ^~ /.well-known/acme-challenge/ {
proxy_pass https://{{ acme_server }}.{{ http_domain_internal }}:443;
resolver 127.0.0.1;
set $acme_host {{ acme_server }}.{{ http_domain_internal }};
proxy_pass https://$acme_host:443;
}
location = /.well-known/acme-challenge/ {