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 upby mahhy - Nginx Mailing List - English
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. Request: http://example.com/2201/reg/106903/0?something=here&somemore=stuff Needs to be proxied to: http://10.11.12.13:2201/reg/106903/0?something=here&somemore=stuff So the 1st portion of the URI is usby mahhy - Nginx Mailing List - English