Proxy Pass based on the first field in the URI

meir hazon meir.hazon at ev-box.com
Wed Sep 11 14:45:21 UTC 2019


Hello,

I have tried to do the following but couldn't pull it out.

Maybe you will have a good idea as I am not an expert.

I would like to proxy pass to different proxies based on the first part of
a URI.

I would also like to pass the message to the proxy without the first part
of the URI but use the rest of it.

Please note that the length and the URI strings and number of fields might
change

example,

incoming to nginx,
https://yyy.com/bla/aa/er
if $1 == bla proxy pass to http://xxx.com/aa/er
if $1 == vv proxy pass to http://ccc.com/aa/er

Thanks so much,

Meir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20190911/a4b03daa/attachment.htm>


More information about the nginx mailing list