You’re essentially running into this:
I have to recommend using a subdomain for that app instead of trying to proxy it under a subpath. On most linux distributions, *.localhost
will also resolve to 127.0.0.1
, so you could use rstudio.localhost
to differentiate it from other apps.
If the app has a “base path” configuration or equivalent, you might use that to avoid needing to do additional manipulations. If it doesn’t, then it’ll always be a struggle to fix all the paths it responds with (including CSS/JS paths in HTML, redirects, etc).