Context to Monit External App

Discussion in 'Install/Configuration' started by hugemikeyd, May 1, 2008.

  1. hugemikeyd

    hugemikeyd New Member

    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
  2. mistwang

    mistwang LiteSpeed Staff

  3. hugemikeyd

    hugemikeyd New Member

    So can i rewrite that at least the path part off?
  4. mistwang

    mistwang LiteSpeed Staff

    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]
  5. hugemikeyd

    hugemikeyd New Member

    ah using the external app name was the key, i didn't think i could do that and was trying to use 127.0.0.1.

    Thanks!

Share This Page