Welcome! Log In Create A New Profile

Advanced

Re: map nginx

Anton Yuzhaninov
June 22, 2011 07:48AM
On 06/22/11 15:31, Vitaly Tskhovrebov wrote:
>
> Теоретически, для разных блоков server хотелось использовать разные maps для
> одной куки, например. Это можно решить возможностью вынесения мапов внутрь server.

Теоретически можно сделать так:

map $cookie_NAME $xxx_backend {
A host1;
B host2;
C host3;

default host0;
}

map $cookie_NAME $yyy_backend {
A host4;
B host5;
C host6;

default host10;
}

server {
server_name xxx;
...
location ... {
proxy_pass http://$xxx_backend;
}
}

server {
server_name yyy;
...
location ... {
proxy_pass http://$yyy_backend;
}
}



--
Anton Yuzhaninov

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

map nginx

vt June 22, 2011 01:18AM

Re: map nginx

Maxim Dounin June 22, 2011 04:38AM

Re: map nginx

vt June 22, 2011 06:10AM

Re: map nginx

Вадим Лазовский June 22, 2011 06:54AM

Re: map nginx

vt June 22, 2011 07:32AM

Re: map nginx

Anton Yuzhaninov June 22, 2011 07:48AM

Re: map nginx

vt June 22, 2011 07:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 332
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 466 on July 09, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready