Index: trunk/server/common/oursrc/execsys/ldapize.pl
===================================================================
--- trunk/server/common/oursrc/execsys/ldapize.pl	(revision 1822)
+++ trunk/server/common/oursrc/execsys/ldapize.pl	(revision 1823)
@@ -11,4 +11,7 @@
 my $mesg;
 
+my $vhostName = $hostname;
+
+vhost:
 # oh my gosh Net::LDAP::Filter SUCKS
 my $filter = bless({and =>
@@ -17,7 +20,7 @@
      {or =>
          [{equalityMatch => {attributeDesc  => 'scriptsVhostName',
-                             assertionValue => $hostname}},
+                             assertionValue => $vhostName}},
           {equalityMatch => {attributeDesc  => 'scriptsVhostAlias',
-                             assertionValue => $hostname}}]}]},
+                             assertionValue => $vhostName}}]}]},
     'Net::LDAP::Filter');
 
@@ -31,4 +34,10 @@
 
 my $vhostEntry = $mesg->pop_entry;
+if (!defined $vhostEntry) {
+  $vhostName ne '*' or die 'No vhost for *';
+  $vhostName =~ s/^(?:\*\.)?[^.]*/*/;  # Try next wildcard
+  goto vhost;
+}
+
 my $vhostDirectory = $vhostEntry->get_value('scriptsVhostDirectory');
 
