Add ServerAlias support

tags/0.2.0 0.2.0
Daniel Berteaud 12 years ago
parent a6994e7b40
commit f2fcc415fe
  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