Would "root" allow for captures?
Igor Sysoev
is at rambler-co.ru
Fri Apr 10 09:58:53 MSD 2009
On Thu, Apr 09, 2009 at 10:24:12PM -0700, Michael Shadle wrote:
> i'd like to do something like:
>
> server {
> listen 80;
> server_name *.user.foo.com;
server_name ~^(.+)\.user\.foo\.com$;
> root /home/user/web/$1;
> }
>
> this would be basically required too:
>
> server {
> listen 80;
> server_name *.user.foo.com;
> root /home/user/web/$1;
> if ($1 == 'something) {
> require include.conf;
> }
> }
This i ssome kind of configuration macro, but it's currently not easy
to implement this.
> it would be nice if i could assign "user" as a variable too. however,
> that would be a double bonus.
>
> i think alias allows captures, but i would need to define
> DOCUMENT_ROOT then as well.
The "root" supports captures too.
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list