title: TeamCity behind nginx proxy
body: <p>I am trying to set up TeamCity behind nginx. I'd like <a href="https://public.address.com/teamcity/" rel="noreferrer">https://public.address.com/teamcity/</a>... to redirect to <a href="http://127.0.0.1:8111/" rel="noreferrer">http://127.0.0.1:8111/</a>..., but even though nginx does this successfully, the login page comes back with references that look like this:</p>
  
  <pre><code>&lt;script type="text/javascript" src="/res/-8762791360234593415.js?v=1305815890782"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Obviously, this won't do, and fiddling with the <code>rootURL</code> setting (<strong>Server URL:</strong> in <strong>Server Configuration</strong>) doesn't make any difference.</p>
  
  <p><strong>How do I run TeamCity behind a proxy under a non-root URL?</strong></p>
  
  <hr>
  
  <p>FWIW, here's the relevant portion of my nginx config:</p>
  
  <pre><code>location /teamcity/ {
      proxy_pass       http://127.0.0.1:8111/;
      proxy_redirect   http://127.0.0.1:8111/ https://$host/teamcity/;
  }
  </code></pre>