how to proxy request to different upstream by url request parameters.

Thomas Glanzmann thomas at glanzmann.de
Sat Mar 22 06:40:15 UTC 2014


Hello,

> > How to proxy request to different upstream by url request parameters?

> http://nginx.org/en/docs/http/ngx_http_upstream_module.html#sticky

this is part of the commercial subscription, but you can probably obtain
the same using a MAP like that:

map $arg_key $backend {
        key1 backend1;
        key2 backend2;
        default fail;
}

proxy_pass http://$arg_key;

Cheers,
        Thomas



More information about the nginx mailing list