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: geo


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: geo
  • From: Dmitriy Belousov <mysenderbox@xxxxxxxxx>
  • Date: Fri, 20 Nov 2009 16:46:58 +0300
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=+ey+MKERHLnrPJ8Mckq7bqbhjDTPOwQVjdzfbr8aoIc=; b=Xrtald/A4EhKKqchiCn9B+oWGtbllW1pQmjyHSG6DURoMtTUfZc0qhJV8HE6Vl535d wXOZpfU1VUeonD4B/GbjMXoxPpR1lhgSKC+BdxMXmZurn5TlRfV8ksdI7QHE8cnq7W9u OGRrXV0I4OZ+APZpUoWUqRT42+0bZ5ozJV/bU=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=uB8UZdIu5X0Q1Q+3WIQTrS0UruNTWHaC9DKPm3OW9FecjLaUgStX6306GlsTiC4JTY U4TcXWFiU1eLuC8meuaCJuXAVAM3dfopM4HVKSDpGGJlOqDRcdm+kG3OkZ6HATrObX/a tcNGrWYiL5jT439ueQ0L9wnJDaQAFJjqdjPq4=
  • In-reply-to: <20091120115750.GD82093@xxxxxxxxxxxxx>
  • References: <c09d68bb0911200238v6fcbb78au283ac295e8423c4a@xxxxxxxxxxxxxx> <20091120115750.GD82093@xxxxxxxxxxxxx>

. , - , .

20 2009 . 14:57 Igor Sysoev <is@xxxxxxxxxxxxx> :
On Fri, Nov 20, 2009 at 01:38:39PM +0300, Dmitriy Belousov wrote:

> , ,
> :))
>
> , . :
>
> ...
> geo $net
> {
> default 0;
> 99.99.99.99/21 1;
> }
>
> ...
> ...
>
> server
> {
> server_name myserver.ru;
>
> listen 100.100.100.100:80;
>
> if ($net)
> {
> rewrite ^(.*)$ http://net.myserver.ru$1;
> }
>
> location / {
> proxy_pass http://127.0.0.1:8210/;
> proxy_set_header Host $host;
> proxy_set_header X-Real-IP $remote_addr;
>
> }
>
> location /location1/ {
> alias /path/to/location1/;
> access_log off;
> expires 30d;
> }
>
> location /location2/ {
> alias /path/to/location2/;
> access_log off;
> expires 30d;
> }
> ...
> ...
> location /forum/ {
> access_log on;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_pass http://192.168.199.199:8220/;
> }
>
> ...
> ...
> }
>
> , $net
> . - , ,
> , ..
> - ( ). ,
> - /forum/,
> . -
> $net , /forum/. ,
> ?

- rewrite ^(.*)$ http://net.myserver.ru$1;
+ rewrite ^(/(?!forum/).*)$ http://net.myserver.ru$request_uri?;


--

http://sysoev.ru



  • References:

 




Copyright © Lexa Software, 1996-2009.