title: how to use url pathname as upstream hash in nginx
body: <p>I have a nginx server with config to use queryparam as upstream hash. Url looks like below  </p>
  
  <pre><code>http://www.my-server.com/xyz/WXYZ?abc=123
  </code></pre>
  
  <p>And configuration as below  </p>
  
  <pre><code>upstream test {
      hash $arg_abc;
      ....
  }
  </code></pre>
  
  <p>is there any possibility to use <code>WXYZ</code> part of URL as upstream hash?</p>
  
  <p><code>WXYZ</code> is dynamic value and <code>xyz</code> is always same and will be there.</p>
  
  <p>this is what I tried,</p>
  
  <pre><code>location ~ ^/xyz/(.).*$ {
     hash $1
  }
  </code></pre>