ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: server_name & location captures


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: server_name & location captures
  • From: Andrei Nigmatulin <andrei.nigmatulin@xxxxxxxxx>
  • Date: Wed, 21 Oct 2009 18:33:57 +0400
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:references:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:message-id; bh=aVJUyed/HIp70eDYQc5uFfa/Wbq/LBjBIWjkQuy02Qw=; b=uzMeJ6y46xQzKuuq/q27ES+Eg16copcxdOOcY0BNRkBSueZwrcgnzeKqbuSQjLFIo1 vQWTSlU+NtMVyn9QMhqnHZNVYpNJB1gTuSWkUBwFU2zQvLwo8YwIJd1QLGZe+9QvwCin +z+vwtn5F+9Hu/fIr/ZCu/WAqpuhe7Q3xXM8s=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :message-id; b=hp7NpXfHSh+sKeNHRpvfMgnspaYefKigqsf/gnfFVsnfyLM7kyQMrOrfegZOeKXLRp /KZAx0N0fO9cttVTwEdkx3XHs/0LAaxjqRZFfsNwLPBP2PnVAS41b/rrSfxf5MWzmPkX V/vO6qu6YFTWoAPy9X6X7RVhsYcbrVT9Vgqyg=
  • In-reply-to: <20091021141713.GN3199@xxxxxxxxxxxxx>
  • References: <20091021141713.GN3199@xxxxxxxxxxxxx>

On Wednesday 21 October 2009 18:17, Igor Sysoev wrote:
> Есть идея для выделений в server_name и location использовать специальные
> имена %N и @N:
>
>   server {
>      server_name ~^(\w+)\.intrasearch\.(.+)$;
>      root   /usr/local/www/intrasearch-dev/%1;
>
>   location ~ ^/~user(/[^/]+)(.+)$ {
>      alias  /homes/@1/public_html@2;

Это чтобы не писать "set $var $1" внутри server и location ?

А конструкции вида

if ($v ~ "(...)") {
    set $var $1;
}

при этом останутся доступны ?


-- 
Andrei Nigmatulin
GPG PUB KEY 6449830D

Now I lay me down to sleep(3)
Pray the OS my core to keep
If I die before I wake
Pray the Disk my core to take


 




Copyright © Lexa Software, 1996-2009.