Add ServerAlias support

tags/0.2.2
Daniel Berteaud 13 years ago
parent a6994e7b40
commit efbed2d17d
  1. 13
      root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/WebAppVirtualHost/03ServerAlias

@ -0,0 +1,13 @@
ServerAlias {
use esmith::HostsDB;
use esmith::DomainsDB;
my $hdb = esmith::HostsDB->open_ro();
my %domains = map { $_->key => 1 } esmith::DomainsDB->open_ro->domains;
my @hosts = grep {
my $h = $_;
($h->prop('HostType') eq 'Self') && !$domains{$h->key}
} $hdb->get_hosts_by_domain($virtualHost);
$OUT = join " ", map { $_->key } @hosts;
}
Loading…
Cancel
Save