From c200387012776f811e0b06408332add8535712eb Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sun, 24 Jan 2016 09:36:53 +0100 Subject: [PATCH] Add possibility to proxy pass ACME challenges --- .../templates/etc/httpd/conf/httpd.conf/WebAppVirtualHost/50Content | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/WebAppVirtualHost/50Content b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/WebAppVirtualHost/50Content index 5ee26fc..52dfbb5 100644 --- a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/WebAppVirtualHost/50Content +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/WebAppVirtualHost/50Content @@ -5,6 +5,7 @@ my $base = esmith::util::ldapBase($DomainName); my $name = $domain->key; my $target = $domain->prop('ProxyPassTarget') || ''; +my $proxy_acme = $domain->prop('ProxyPassACMEChallenges') || 'disabled'; my $redirect = $domain->prop('Redirect') || ''; my $rewrite = $domain->prop('Rewrite') || ''; my $allow = $domain->prop('AllowHosts') || ''; @@ -20,7 +21,7 @@ my @groups = split(/[;,]/, ($domain->prop('AllowGroups') || '')); # ProxyPass ? if ($target =~ m|https?://[\d\w\.\-/]*|){ $OUT .= " SetEnv proxy-nokeepalive 1\n" if ($keepalive eq 'yes'); - $OUT .= " ProxyPass /.well-known/acme-challenge/ !\n"; + $OUT .= " ProxyPass /.well-known/acme-challenge/ !\n" unless ($proxy_acme eq 'enabled'); $OUT .= " ProxyPass / $target\n"; $OUT .= " ProxyPassReverse / $target\n"; $OUT .= " ProxyPreserveHost on\n" if ($preserve eq 'yes');