From 23112c3eefb94812526048fa5ceb226db72ad13d Mon Sep 17 00:00:00 2001 From: Judah MW Date: Thu, 28 Apr 2022 15:48:20 +0200 Subject: [PATCH] nginx: Added ACME redirect to main domain based on alias domain fix This allows sites using redirect=proxy to still generate ACME certificates by not passing the acme requests through to the proxy. We should also consider using this for other features available such as own error documents, SSI and custom directives. --- server/conf/nginx_vhost.conf.master | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master index 1c219f0cd4..400d9b9af2 100644 --- a/server/conf/nginx_vhost.conf.master +++ b/server/conf/nginx_vhost.conf.master @@ -69,6 +69,16 @@ server { if ($http_host != "") { rewrite ^(.*)$ $2 ; } + ## no proxy for acme-challenge + location ^~ /.well-known/acme-challenge/ { + access_log off; + log_not_found off; + root /usr/local/ispconfig/interface/acme/; + autoindex off; + index index.html; + try_files $uri $uri/ =404; + } + location / { proxy_pass ; rewrite ^/(.*) /$1; -- GitLab