Possibility to ProxyPass only ACME challenge URL

tags/0.2.17_el5 0.2.17_el5
Daniel Berteaud 9 years ago
parent 890638d02b
commit 955efaefdf
  1. 14
      root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/WebAppVirtualHost/50Content

@ -21,9 +21,17 @@ my @groups = split(/[;,]/, ($domain->prop('AllowGroups') || ''));
# ProxyPass ? # ProxyPass ?
if ($target =~ m|https?://[\d\w\.\-/]*|){ if ($target =~ m|https?://[\d\w\.\-/]*|){
$OUT .= " SetEnv proxy-nokeepalive 1\n" if ($keepalive eq 'yes'); $OUT .= " SetEnv proxy-nokeepalive 1\n" if ($keepalive eq 'yes');
$OUT .= " ProxyPass /.well-known/acme-challenge/ !\n" unless ($proxy_acme eq 'enabled'); if ($proxy_acme eq 'disabled'){
$OUT .= " ProxyPass / $target\n"; $OUT .= " ProxyPass /.well-known/acme-challenge/ !\n";
$OUT .= " ProxyPassReverse / $target\n"; }
elsif ($proxy_acme eq 'only'){
$OUT .= " ProxyPass /.well-known/acme-challenge/ $target" . ".well-known/acme-challenge/\n";
$OUT .= " ProxyPassReverse / $target" . ".well-known/acme-challenge/\n";
}
else{
$OUT .= " ProxyPass / $target\n";
$OUT .= " ProxyPassReverse / $target\n";
}
$OUT .= " ProxyPreserveHost on\n" if ($preserve eq 'yes'); $OUT .= " ProxyPreserveHost on\n" if ($preserve eq 'yes');
} }
# Rewrite ? # Rewrite ?

Loading…
Cancel
Save