From a84204bfcd80b7669b384393b59fb8e84c9ee0e2 Mon Sep 17 00:00:00 2001 From: Frank Wall Date: Tue, 30 Apr 2019 16:52:42 +0200 Subject: [PATCH] www/nginx: fix ACME support, refs #711 (#1315) --- .../src/opnsense/service/templates/OPNsense/Nginx/http.conf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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' %}