Index: DJabberd/lib/DJabberd.pm =================================================================== --- DJabberd/lib/DJabberd.pm (revision 738) +++ DJabberd/lib/DJabberd.pm (working copy) @@ -458,7 +458,7 @@ } if ($line =~ //i) { die "Can't configure a vhost in a vhost\n" if $vhost; - $vhost = DJabberd::VHost->new(server_name => $1); + $vhost = DJabberd::VHost->new(server_name => $1, server => $self); next; } if ($line =~ m!!i) { Index: DJabberd/lib/DJabberd/VHost.pm =================================================================== --- DJabberd/lib/DJabberd/VHost.pm (revision 738) +++ DJabberd/lib/DJabberd/VHost.pm (working copy) @@ -16,7 +16,7 @@ 'require_ssl' => delete $opts{require_ssl}, 's2s' => delete $opts{s2s}, 'hooks' => {}, - 'server' => undef, # set when added to a server + 'server' => delete $opts{server}, # set when added to a server # local connections 'jid2sock' => {}, # bob@207.7.148.210/rez -> DJabberd::Connection