Add support for custom alias on WebAppVirtualHost domains

This commit is contained in:
Daniel Berteaud 2014-01-30 14:51:58 +01:00
parent 2dcd5a30fd
commit 1958977906
1 changed files with 8 additions and 0 deletions

View File

@ -10,6 +10,7 @@ my $rewrite = $domain->prop('Rewrite') || '';
my $allow = $domain->prop('AllowHosts') || '';
my $preserve = $domain->prop('ProxyPreserveHost') || 'no';
my $keepalive = $domain->prop('ProxyNoKeepAlive') || 'no';
my @alias = split /[,;]/, ($domain->prop('Alias') || '');
my @env = split(/[;,]/, ($domain->prop('SetEnv') || ''));
my $auth = $domain->prop('Authentication') || 'none';
my @groups = split(/[;,]/, ($domain->prop('AllowGroups') || ''));
@ -44,6 +45,13 @@ else{
$OUT .= " DocumentRoot $root\n";
}
foreach (@alias){
next unless $_ =~ m/^(\/\w+)=(\/.*)/;
my ($al, $targ) = ($1, $2);
next unless (-e $2);
$OUT .= " Alias $al $targ\n";
}
foreach (@env){
next unless (m/^(.*)=(.*)$/);
$OUT .= " SetEnv $1 $2\n";