Add support for custom alias on WebAppVirtualHost domains

tags/0.2.11_el5 0.2.11_el5
Daniel Berteaud 10 years ago
parent 2dcd5a30fd
commit 1958977906
  1. 8
      root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/WebAppVirtualHost/50Content

@ -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";

Loading…
Cancel
Save