title: Dynamix Nginx proxy-pass with a variable from the location path
body: <p>What I want to achieve is to use an proxy-pass for a given URL and the proxy-pass domain name depends from the location URL.
  Something like this:</p>
  <pre><code>location ~ ^/([0-9]+)/api/ {
        proxy_pass http://server-$1:8080;
    }
  </code></pre>
  <p>logically an URL for example: <strong>/4/api/auth/login</strong>  to use a proxy  <strong>http://server-4:8080/api/auth/login</strong></p>