Welcome! Log In Create A New Profile

Advanced

Re: Would "root" allow for captures?

April 10, 2009 01:58AM
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/
Subject Author Posted

Would "root" allow for captures?

mike April 10, 2009 01:24AM

Re: Would "root" allow for captures?

edogawaconan April 10, 2009 01:56AM

Re: Would "root" allow for captures?

Igor Sysoev April 10, 2009 01:58AM

Re: Would "root" allow for captures?

mike April 10, 2009 02:11AM

Re: Would "root" allow for captures?

mike April 11, 2009 01:30PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 155
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready