Virtual Document Root

Igor Sysoev igor at sysoev.ru
Sat Jan 22 10:51:41 MSK 2011


On Fri, Jan 21, 2011 at 03:51:10PM -0800, Blake Scrivner wrote:

> Hello All,
> 
> Is there a configuration for Nginx that is comparable to Apache's VirtualDocumentRoot?  For example, in an Apache vhost conf file I can have "VirtualDocumentRoot /var/www/html/_%-2.0.%-1.0/%-3/%-4+/current/" and it will map incoming traffic to a specific directory based on the URL.

nginx supports regular expression captures for server name:
http://nginx.org/en/docs/http/server_names.html#regex_names


-- 
Igor Sysoev
http://sysoev.ru/en/



More information about the nginx mailing list