Nginx mass dynamic virtual hosts like apache?

anagio nginx-forum at nginx.us
Sun Nov 20 09:42:35 UTC 2011


Given I use this method for sub-domains

map $http_host $subdir {
hostnames;
default "default";
.foo.bar.com "foo";
.baz.bar.com "baz";
}

Is there a method to redirect any requests for sub-domains which do not
exist (404s) to a custom html/php page?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,218617,218634#msg-218634



More information about the nginx mailing list