With nginx is there a method to setup mass dynamic virtual hosts similar to the way apache2 can be configured? I'm setting up an saas application each user will have their own subdomain and i'd like to use nginx over apache2.
Thanks
Code below should be how to configure
map $http_host $subdir {
hostnames;
default "default";
.foo.bar.com "foo";
.baz.bar.com "baz";
}
server {
root /path/to/$subdir;
}
nginx -s reloadwill reload I suppose the config files without users getting disconnected. On another forum a user also suggested the HttpMapModule, I added it to my code above. – Anagio Nov 20 '11 at 6:47