a*.domain.com-like wildcard subdomain redirect or URL matching table?

webmaster admin at 72pines.com
Thu Mar 8 00:21:56 MSK 2007


Hi, I am wondering whether nginx can be used for the following scenario:

nginx is set up as a frontend load balancer, and pass HTTP request based 
on their URL to backend webservers.

Currently, I am using a configuration, based on a server {} enclosure 
for each subdomain. However, a better way would be using the URL match 
based on some sort of wildcard, like a*.domain.com  (any subdomain name 
starting with the letter "a").

Ideally, it would be even better if a matching table can be used, say a 
matching table file containing a list like the following:

a1.domain.com   192.168.0.1
a2.domain.com   192.168.0.1
a3.domain.com   192.168.0.2
b1.domain.com   192.168.0.2

Is this doable with nginx and how? Thanks.

Best,

-kingler






More information about the nginx mailing list