(now complete) Nagios-Grapher and reverse proxy for https (fix included)
Heiko Schlittermann
hs at schlittermann.de
Wed Nov 21 18:16:37 CET 2007
Hello,
(I'm not sure if I sent already this mail with just the first some
lines. Now it's complete.)
While playing with Nagios-Grapher (1.6.1-rc5) I had some problem,
caused by our https/proxy/http setup as outlined below:
{ world } ---> [proxy (pound)] ---> [apache]
request sent: request received:
https://*/nagios/ -> http://*/nagios/
The proxy terminates the HTTPS connection and thus the nagios cgi
scripts have the "feeling", that they're called via http://.
That's no problem for nagios at all. But for the Nagios Grapher.
In some places the grapher generates self referencing urls (using
CGI::self_url()). And of course, these urls are wrong, because they
contain "http" as protocol, where "https" should be used.
I applied a simple patch in NagiosGrapher/HTML.pm.in:
--- NagiosGrapher-1.6.1-rc5-0.3.orig/lib/NagiosGrapher/HTML.pm.in 2007-08-10 17:05:31.000000000 +0200
+++ NagiosGrapher-1.6.1-rc5-0.3/lib/NagiosGrapher/HTML.pm.in 2007-11-21 11:27:06.000000000 +0100
@@ -279,7 +279,10 @@
@_
);
- my $url = $self->Q->self_url;
+ # We do not include protocol and host information, since this
+ # information could be something else then visible from the outer world (e.g.
+ # if there is sitting a proxy (SSL) in front of us.
+ my $url = $self->Q->url(-relative => 1, -query => 1);
return $url unless($args{Type});
From my current point of view it seems to work.
If somebody could please review it? And could this be applied to the
official source?
Best regards from Dresden
Viele Grüße aus Dresden
Heiko Schlittermann
--
SCHLITTERMANN.de ---------------------------- internet & unix support -
Heiko Schlittermann HS12-RIPE -----------------------------------------
gnupg encrypted messages are welcome - key ID: 48D0359B ---------------
gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2 7E92 EE4E AC98 48D0 359B -
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://www.monitoring-lists.org/archive/users/attachments/20071121/de2a08b5/attachment.sig>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list