How to handle relative urls with Nginx reverse proxy
A reverse proxy can rewrite the request path it sends upstream, but it cannot reliably repair every relative URL generated inside an unaware application.
Prefer configuring the application with its public base path. If that is impossible, response-body rewriting is fragile because URLs can appear in HTML, scripts, redirects, and cookies. See the Server Fault discussion.
Share: