Add DirectoryIndex support

Suggested by HF Wang
This commit is contained in:
Daniel Berteaud 2015-06-30 14:47:08 +02:00
parent 7d2dc535ac
commit 39e50398f9

View File

@ -11,6 +11,7 @@ my $allow = $domain->prop('AllowHosts') || '';
my $preserve = $domain->prop('ProxyPreserveHost') || 'no'; my $preserve = $domain->prop('ProxyPreserveHost') || 'no';
my $keepalive = $domain->prop('ProxyNoKeepAlive') || 'no'; my $keepalive = $domain->prop('ProxyNoKeepAlive') || 'no';
my $timeout = $domain->prop('Timeout') || ''; my $timeout = $domain->prop('Timeout') || '';
my $index = $domain->prop('DirectoryIndex') || '';
my @alias = split /[,;]/, ($domain->prop('Alias') || ''); my @alias = split /[,;]/, ($domain->prop('Alias') || '');
my @env = split(/[;,]/, ($domain->prop('SetEnv') || '')); my @env = split(/[;,]/, ($domain->prop('SetEnv') || ''));
my $auth = $domain->prop('Authentication') || 'none'; my $auth = $domain->prop('Authentication') || 'none';
@ -50,6 +51,10 @@ if ($timeout =~ m/^\d+$/){
$OUT .= " Timeout $timeout\n"; $OUT .= " Timeout $timeout\n";
} }
if ($index ne ''){
$OUT .= " DirectoryIndex $index\n";
}
foreach (@alias){ foreach (@alias){
next unless $_ =~ m/^(\/\w+)=(\/.*)/; next unless $_ =~ m/^(\/\w+)=(\/.*)/;
my ($al, $targ) = ($1, $2); my ($al, $targ) = ($1, $2);