Configurable URL path for reverse proxy
I would like to run lightmeter in a path on an administrator domain, e.g. https://admin.example.org/lightmeter/ and use Apache2's reverse proxy configuration for that:
ProxyPass /lightmeter/ http://localhost:10020/
ProxyPassReverse /lightmeter/ https://localhost:10020/
This works only partly, because lightmeter expects to be run in the root of a host - /
, while it is running here at /lightmeter
.
Currently it redirects back to /
after registration, and other internal links e.g. to the settings go to /settingspage
instead of lightmeter/settingspage
.
It would be nice if lightmeter would do one of these:
- detect such path prefixes and adjust its links
- provide a configuration option to set such url prefixes
- use relative links
Unfortunately I cannot even use mod_proxy_html to rewrite links, because all the links are javascript links:
onclick="window.location.href='/settingspage';"