location ^~ /.well-known/acme-challenge/ { resolver 9.9.9.9; set $acme_host {{ acme_server }}.{{ http_domain_internal }}; proxy_pass https://$acme_host:443; } location = /.well-known/acme-challenge/ { return 404; }