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