monit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Carlos Fernandez Sanz] Removing slashes from monit URL...


From: Jan-Henrik Haukeland
Subject: [Carlos Fernandez Sanz] Removing slashes from monit URL...
Date: Thu, 18 Sep 2003 16:30:14 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Reasonable Discussion, linux)


FYI: A clever trick. It's tempting to look into..

--- Begin Message --- Subject: Removing slashes from monit URL... Date: Thu, 18 Sep 2003 09:53:00 +0200
Hi Jan,
 
I've been testing monit for a few days now, great job!
 
However I have a suggestion.... I have done it for myself (takes an hour or so) but it might be a good idea to put it in 4.0.
Most links (href, etc) in the monit http server start with a slash (/runtime, for example). This is ok when accessing the http server directly, but prevents the server from being reverse-proxied by apache, etc. By removing all slashes, you have have apache map monit's server into the primary server domain. For example, I use
 
http://www.myserver.com/monit
 
to access monit from the outside (suppose I'm in a facility where accessing monit's port directly is not an option, or I don't want to open the port in the firewall, or I prefer that only apache httpd daemon talks to monit to prevent possible buffer overflow exploits).
 
Basically all you have to do is remove the slashes, and also have monit serve the main page as "index.html" (since / requests aren't forwarded by apache).
 
As for the apache config, it's trivial, but this is what I have
 
ProxyPass /monit/ http://localhost:2812/
ProxyPassReverse /monit/ http://localhost:2812/
 
<Location /monit/>
AllowOverride None
AuthType Basic
AuthName sysadmin
AuthUserFile /etc/httpd/passwd
require valid-user
</Location>
Thanks for such a great piece of software!
 

--- End Message ---

-- 
Jan-Henrik Haukeland

reply via email to

[Prev in Thread] Current Thread [Next in Thread]