fix httpd template

This commit is contained in:
Daniel Berteaud 2012-03-29 12:01:24 +02:00
parent 84530086c7
commit 02b97137d1
1 changed files with 13 additions and 13 deletions

View File

@ -39,16 +39,18 @@ Alias /awstatsicons "/usr/share/awstats/wwwroot/icon/"
SSLRequireSSL on
</Directory>
foreach my $dom ($d->domains){
my $stats = $dom->prop('Stats') || 'disabled';
next unless ($stats eq 'enabled');
my $name = $dom->key;
my @users = split /[;,]/, ($dom->prop('StatsUsers') || '');
foreach my $u (@users){
$OUT .= " SetEnvIf Auth-User \"$u\" allow_$name\n";
}
my $allowfromenv = (scalar @users > 0) ? "allow from env=allow_$name":'';
$OUT .=<<"HERE";
EOF
foreach my $dom ($d->domains){
my $stats = $dom->prop('Stats') || 'disabled';
next unless ($stats eq 'enabled');
my $name = $dom->key;
my @users = split /[;,]/, ($dom->prop('StatsUsers') || '');
foreach my $u (@users){
$OUT .= " SetEnvIf Auth-User \"$u\" allow_$name\n";
}
my $allowfromenv = (scalar @users > 0) ? "allow from env=allow_$name":'';
$OUT .=<<"HERE";
<Directory /home/e-smith/files/stats/$name>
DirectoryIndex awstats.$name.html
@ -56,8 +58,6 @@ foreach my $dom ($d->domains){
</Directory>
HERE
}
EOF
}
}
}