Welcome! Log In Create A New Profile

Advanced

Re: proxy_pass, dynamic ports upstream

November 15, 2012 02:33PM
While I can easily build a map as such:

map $uri $engineport {
~^/2201/ 2201;
~^/2202/ 2202;
<snip 100 more ports>
}

This still doesn't seem to work with a set of load balanced upstream servers. Trying to append a port onto the proxy_pass directive when used with an upstream server group fails with the resolver related message in my orignal post.

With a single server upstream this can be done, however I want to round robin/loadbalance over 2 or more...

- mahhy

Jonathan Matthews Wrote:
-------------------------------------------------------
> On 15 November 2012 16:43, mahhy <nginx-forum@nginx.us> wrote:
> > I have a requirement to be able to map a portion of a request URI to
> a port
> > on a set of upstream servers. I'm hoping nginx will be able to
> solve this
> > for me, but so far no luck.
>
> Use a map: http://nginx.org/r/map
>
> You'll probably want to use regular expressions, and run the map based
> off $request_uri or $uri.
>
> Jonathan
> --
> Jonathan Matthews // Oxford, London, UK
> http://www.jpluscplusm.com/contact.html
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
SubjectAuthorPosted

proxy_pass, dynamic ports upstream

mahhyNovember 15, 2012 11:43AM

Re: proxy_pass, dynamic ports upstream

Jonathan MatthewsNovember 15, 2012 12:26PM

Re: proxy_pass, dynamic ports upstream

mahhyNovember 15, 2012 02:33PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 113
Record Number of Users: 2 on November 23, 2014
Record Number of Guests: 377 on November 23, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready