LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Context to Monit External App

Reply
 
Thread Tools Display Modes
  #1  
Old 05-01-2008, 10:04 AM
hugemikeyd hugemikeyd is offline
Member
 
Join Date: Mar 2006
Location: New York
Posts: 42
Default Context to Monit External App

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
Reply With Quote
  #2  
Old 05-01-2008, 10:10 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
When LSWS proxy the request to monit, it will not change the domain name, so monit will receive request http://myhost.com/monit instead of http://127.0.0.1/monit.
Reply With Quote
  #3  
Old 05-01-2008, 10:19 AM
hugemikeyd hugemikeyd is offline
Member
 
Join Date: Mar 2006
Location: New York
Posts: 42
So can i rewrite that at least the path part off?
Reply With Quote
  #4  
Old 05-01-2008, 10:30 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
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]
Reply With Quote
  #5  
Old 05-01-2008, 10:47 AM
hugemikeyd hugemikeyd is offline
Member
 
Join Date: Mar 2006
Location: New York
Posts: 42
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!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:02 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.