|
|
|
@ -20,6 +20,18 @@ my @groups = split(/[;,]/, ($domain->prop('AllowGroups') || '')); |
|
|
|
|
my $ssl_port = $modSSL{'TCPPort'} || '443'; |
|
|
|
|
my $proto = ($port eq $ssl_port ) ? 'https' : 'http'; |
|
|
|
|
my $socketio = $domain->prop('ProxySocketIO') || 'disabled'; |
|
|
|
|
my @proxyrules = split /[,;]/, ($domain->prop('ProxyPassRules') || ''); |
|
|
|
|
|
|
|
|
|
# Custom proxypass rules |
|
|
|
|
foreach my $rule (@proxyrules){ |
|
|
|
|
my ($from, $to) = split /=/, $rule; |
|
|
|
|
$OUT .= " ProxyPass $from $to\n"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (@proxyrules > 0 || $target =~ m|https?://[\d\w\.\-/]*|){ |
|
|
|
|
$OUT .= " ProxyPreserveHost on\n" if ($preserve eq 'yes'); |
|
|
|
|
$OUT .= " RequestHeader set X-Forwarded-Proto \"$proto\"\n"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
# ProxyPass ? |
|
|
|
|
if ($target =~ m|https?://[\d\w\.\-/]*|){ |
|
|
|
@ -51,12 +63,10 @@ if ($target =~ m|https?://[\d\w\.\-/]*|){ |
|
|
|
|
</IfModule> |
|
|
|
|
|
|
|
|
|
_EOF |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
$OUT .= " ProxyPass / $target\n"; |
|
|
|
|
$OUT .= " ProxyPassReverse / $target\n"; |
|
|
|
|
} |
|
|
|
|
$OUT .= " ProxyPreserveHost on\n" if ($preserve eq 'yes'); |
|
|
|
|
$OUT .= " RequestHeader set X-Forwarded-Proto \"$proto\"\n"; |
|
|
|
|
} |
|
|
|
|
# Rewrite ? |
|
|
|
|
elsif ($rewrite =~ m|https?://[\d\w\.\-/]*|){ |
|
|
|
|