diff --git a/www/nginx/src/opnsense/service/templates/OPNsense/Nginx/http.conf b/www/nginx/src/opnsense/service/templates/OPNsense/Nginx/http.conf index abc6ac8a3..93f9978fc 100644 --- a/www/nginx/src/opnsense/service/templates/OPNsense/Nginx/http.conf +++ b/www/nginx/src/opnsense/service/templates/OPNsense/Nginx/http.conf @@ -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' %}