title: Nginx reverse Proxy context
body: <p>I'm trying to proxy pass url with nginx like this :</p>
  
  <pre><code>server {
      listen       9998;
      error_log logs/error_sonar.log debug;
  
      location /sonar/ {
            proxy_pass http://192.168.0.23:9000/;
      }
  </code></pre>
  
  <p>}</p>
  
  <p>but with this configuration, if i call : <a href="http://localhost:9998/sonar/" rel="nofollow noreferrer">http://localhost:9998/sonar/</a> proxypass work but sonar try to do 'GET /css/sonar.877c3354.css' instead of 'GET /sonar/css/sonar.877c3354.css'</p>
  
  <p>how can i say to nginx to add prefix /sonar in all return proxiex url?</p>
  
  <p>I have try</p>
  
  <pre><code>server {
      listen       9998;
      error_log logs/error_sonar.log debug;
  
      location / {
            proxy_pass http://192.168.0.23:9000/;
      }
  </code></pre>
  
  <p>}</p>
  
  <p>and all work fine, but what i wan't to do is to have /sonar, /nexus, /otherapplication on same port.</p>
  
  <p>Does i need to change sonar config to have context /sonar too? And do it for all applications in the same case?</p>
  
  <p>thanks by advance.</p>