title: nginx proxy_pass to root without path
body: <p>In the <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass" rel="nofollow">nginx proxy_pass documentation</a> it says</p>
  
  <blockquote>
    <p>If proxy_pass is specified without a URI, the request URI is <strong>passed to the server in the same form as sent by a client</strong> when the original request is processed, or the full normalized request URI is passed when processing the changed URI</p>
  </blockquote>
  
  <p>(emphasis mine)</p>
  
  <p>What if I want to proxy <code>/foo</code> to <code>http://localhost:8080</code> without trailing <code>foo</code>. How do I do that?</p>