Cookies nginx无法使用映射cookie代理\u pass请求

Cookies nginx无法使用映射cookie代理\u pass请求,cookies,nginx,abtest,Cookies,Nginx,Abtest,我想使用cookie来指示要执行请求的后端服务器。以下是我的配置: upstream backend_prod { server 127.0.0.1:8080; } upstream backend_abenv { server 127.0.0.1:9090; } map $COOKIE_backend $gated { default prod; eexxpptt abenv; } server { listen 8888;

我想使用cookie来指示要执行请求的后端服务器。以下是我的配置:

upstream backend_prod   {
    server 127.0.0.1:8080;
}
upstream backend_abenv   {
    server 127.0.0.1:9090;
}
map $COOKIE_backend $gated {
    default prod;
    eexxpptt abenv;
}
server {
    listen       8888;
    server_name  localhost;
    location / {
        index  index.jsp index.html index.htm;
        proxy_pass http://backend_$gated;
    }
}
我已经设置了cookie后端:eexxpptt。 但我有一个奇怪的网址http://backend_prod 当我访问http://localhost:8888 镀铬的。不要接触8080或9090服务器


有什么建议吗

nginx 1.6.0_1,OS X 10.9.4