Context to Monit External App

#1
I am trying to map http://myhost.com/monit to my local running monit http instance.

What i have configured is an monit external app configured as a webserver at 127.0.0.1:2812 and then i create a context in my VHost that takes /monit and points it to the monit external app as a proxy.

All i get in a 404 not found from monit.

I am thinking that the context is taking http://myhost.com/monit and creating a http://127.0.0.1/monit, which is incorrect. Is this correct? Is there something i can do to take care of this?

Thanks,

Michael
 

mistwang

LiteSpeed Staff
#4
I think it should work if you use a rewrite rule to tell LSWS to proxy the request, get rid of the context.

RewriteRule ^/monit(.*) http://<name_of_proxy_app>/$1 [P]
 
Top