sub domain trickery

cjaredrun nginx-forum at
Mon Jan 3 15:00:12 MSK 2011

Not sure if this is possible, but I am wanting to make subdomains be
redirected to specific folders dynamically via the nginx.conf file.  so
my DNS would point * to the server. and depending on what the
person typed in for the subdomain, for example it
would point them to ~/public_html/folder1 for the site files. >> site files in ~/public_html/folder2.   

So if the folder exists, it goes there otherwise, goes 404. 

Is this possible to pull off dynamically? 

Thanks for thoughts on this.


Posted at Nginx Forum:,163076,163076#msg-163076

More information about the nginx mailing list