I'm using Apache
and mod_proxy
to provide access to the Monit
GUI over HTTP. So far my configuration is as follows:
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost on
ProxyPass /monit http://localhost:2812/
ProxyPassReverse /monit http://localhost:2812/
When people go to http://mywebsite/monit
they do get the Monit home page. However the links returned by Monit have an absolute path, which breaks the proxy which is only applied to paths starting with /monit
. I could create a separate vhost
just for Monit
(e.g. http://monit.mywebsite
) which would fix the problem, but was wondering if there was another solution.
Q1: Is there a way to get Apache to rewrite links in HTML code to prepend whatever path is defined in the ProxyPass
and ProxyPassReverse
directive?
Q2: If above not possible, do you see another solution than the separate vhost
I **mentioned?