Welcome! Log In Create A New Profile

Advanced

One last question about root captures/etc.

May 04, 2009 04:13AM
The first one always gets matched. Is there a way to make nginx use
the one that matches the best?

i.e.

foo123.mike.bar.com should go to #2
foo.mike.bar.com should go to #2
blah.mike.bar.com should go to #1

etc.

i've tried in opposite order but it seems that it always sides with
the more generic one, which does make sense i suppose but perhaps
there is a way around it?

thanks.


server {
listen 80;
index index.php index.html;
server_name ~^(.*?)\.mike\.bar\.com$;
set $name $1;
root /home/mike/web/$name;
location / { }
}


server {
listen 80;
index index.php index.html;
server_name ~^foo(.*?)\.mike\.bar\.com$;
set $name $1;
root /home/mike/web/foo$name;
location / { }
}
Subject Author Posted

One last question about root captures/etc.

mike May 04, 2009 04:13AM

Re: One last question about root captures/etc.

Igor Sysoev May 04, 2009 04:19AM

Re: One last question about root captures/etc.

mike May 04, 2009 04:34AM

Re: One last question about root captures/etc.

mike May 04, 2009 04:37AM

Re: One last question about root captures/etc.

mike May 04, 2009 04:33AM

Re: One last question about root captures/etc.

deltay May 04, 2009 04:29AM

Re: One last question about root captures/etc.

Igor Sysoev May 04, 2009 05:51AM

about limit the total bandwidth

dennisjanuary May 04, 2009 07:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 290
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