diff --git a/virtualmin-nginx-lib.pl b/virtualmin-nginx-lib.pl index eada438..62911b3 100644 --- a/virtualmin-nginx-lib.pl +++ b/virtualmin-nginx-lib.pl @@ -1311,7 +1311,7 @@ sub find_domain_server foreach my $s (@servers) { my $obj = &find("server_name", $s); foreach my $name (@{$obj->{'words'}}) { - if (defined($name) && ref($d) && (lc($name) eq lc($d->{'dom'}) || + if (defined($name) && (lc($name) eq lc($d->{'dom'}) || lc($name) eq "www.".lc($d->{'dom'}) || lc($name) eq "*.".lc($d->{'dom'}))) { return $s;