title: nginx proxy_pass dynamic hostname part
body: <p>When nginx proxy_pass is a dynamic value expected to be build by substituting hostname part in URL, nginx is failing to proxy request with error: <em>no resolver defined to resolve <strong>service</strong> where <strong>service</strong>=$1</em>. Instead of trying to resolve service.abcd.local, it seems it is trying to resolve just <strong>service</strong>. Is there solution to this ?</p>
  
  <pre><code>location ~ ^/(.*)/(.*)$ {
    proxy_pass http://$1.abcd.local/$1/$2;   
  }
  </code></pre>