fix httpd template

tags/0.1.0
Daniel Berteaud 13 years ago
parent 84530086c7
commit 02b97137d1
  1. 26
      root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98awstats

@ -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
}
}
}

Loading…
Cancel
Save