upstream hash on portion of URL

Scott Royston scott.royston at
Fri May 30 18:57:15 MSD 2008

I'd like to use the Upstream Hash Module, but have the hash be based
on just a portion of the URL.

For example, I have urls of the form:


and I'd like the hash to be based on 'hash_part1' and 'hash_part2'.

Looking at the module doc, it takes a variable to do the hash on.  Is
there any way to set a variable based on a regex expression?  Or is
there another easy way to do this?


More information about the nginx mailing list