title: How to preserve request url with nginx proxy_pass
body: <p>I was trying to use <a href="http://code.macournoyer.com/thin/" rel="noreferrer">Thin</a> app server and had one issue.</p>
  
  <p>When nginx <a href="http://wiki.nginx.org/HttpProxyModule#proxy_pass" rel="noreferrer">proxies</a> the request to Thin (or Unicorn) using <code>proxy_pass http://my_app_upstream;</code> the application receives the modified URL sent by nginx (<code>http://my_app_upstream</code>). </p>
  
  <p>What I want is to pass the original URL and the original request from client with no modification as the app relies heavily on it.</p>
  
  <p>The nginx' <a href="http://wiki.nginx.org/HttpProxyModule#proxy_pass" rel="noreferrer">doc</a> says:</p>
  
  <blockquote>
    <p>If it is necessary to transmit URI in
    the unprocessed form then directive
    proxy_pass should be used without URI
    part.</p>
  </blockquote>
  
  <p>But I don't understand how exactly to configure that as the related sample is actually using URI:</p>
  
  <pre><code>location  /some/path/ {
    proxy_pass   http://127.0.0.1;
  }
  </code></pre>
  
  <p>So could you please help me figuring out how to <strong>preserve the original request URL</strong> from the client?</p>