|
|
@ -5,6 +5,7 @@ my $base = esmith::util::ldapBase($DomainName); |
|
|
|
|
|
|
|
|
|
|
|
my $name = $domain->key; |
|
|
|
my $name = $domain->key; |
|
|
|
my $target = $domain->prop('ProxyPassTarget') || ''; |
|
|
|
my $target = $domain->prop('ProxyPassTarget') || ''; |
|
|
|
|
|
|
|
my $proxy_acme = $domain->prop('ProxyPassACMEChallenges') || 'disabled'; |
|
|
|
my $redirect = $domain->prop('Redirect') || ''; |
|
|
|
my $redirect = $domain->prop('Redirect') || ''; |
|
|
|
my $rewrite = $domain->prop('Rewrite') || ''; |
|
|
|
my $rewrite = $domain->prop('Rewrite') || ''; |
|
|
|
my $allow = $domain->prop('AllowHosts') || ''; |
|
|
|
my $allow = $domain->prop('AllowHosts') || ''; |
|
|
@ -20,7 +21,7 @@ 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"; |
|
|
|
$OUT .= " ProxyPass /.well-known/acme-challenge/ !\n" unless ($proxy_acme eq 'enabled'); |
|
|
|
$OUT .= " ProxyPass / $target\n"; |
|
|
|
$OUT .= " ProxyPass / $target\n"; |
|
|
|
$OUT .= " ProxyPassReverse / $target\n"; |
|
|
|
$OUT .= " ProxyPassReverse / $target\n"; |
|
|
|
$OUT .= " ProxyPreserveHost on\n" if ($preserve eq 'yes'); |
|
|
|
$OUT .= " ProxyPreserveHost on\n" if ($preserve eq 'yes'); |
|
|
|