Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

rewrite URL (1 reply)

$
0
0
Hello,

I try to use Nginx as a proxy (for SSL) on a Jetty server. The Jetty application should be accessed by a subdirectory of my Nginx. I have setup this location configuration:

location /myapp {

proxy_pass http://localhost:8112;

proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
#proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
client_max_body_size 650M;

}

The Jetty server runs under http://localhost:8112, if I change the „location /myapp“ to „location /„ everything works fine. The Jetty server returns URLs with the base URL /, so on this configuration CSS / JSS files are not found.
How can I rewrite the URLs, so that all files are found within the directory /myapp ?

Thanks

Phil
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>