www/nginx: fix ACME support, refs #711 (#1315)

This commit is contained in:
Frank Wall
2019-04-30 16:52:42 +02:00
committed by Fabian Franz BSc
parent e73ec0ce49
commit a84204bfcd
@@ -180,7 +180,11 @@ server {
{% if server.enable_acme_support is defined and server.enable_acme_support == '1' %}
location ^~ /.well-known/acme-challenge/ {
default_type "text/plain";
root /var/etc/acme-client/challenges;
{% if helpers.exists('OPNsense.AcmeClient.settings.challengePort') and OPNsense.AcmeClient.settings.challengePort|default("") != "" %}
proxy_pass http://127.0.0.1:{{OPNsense.AcmeClient.settings.challengePort}};
{% else %}
proxy_pass http://127.0.0.1:43580;
{% endif %}
}
{% endif %}
{% if server.disable_bot_protection is not defined or server.disable_bot_protection != '1' %}