From 1be43d91f9fc12e8763e2123e94728dd581982ad Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Thu, 28 Nov 2013 13:02:35 +0100 Subject: [PATCH] fixed to handle correctly the 'https_url' option --- monitorix.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monitorix.cgi b/monitorix.cgi index e29a553..b62e04a 100755 --- a/monitorix.cgi +++ b/monitorix.cgi @@ -215,7 +215,8 @@ my $conf = new Config::General( ); %config = $conf->getall; -$config{url} = ($ENV{HTTPS} || $config{https_url} eq "y") ? "https://" . $ENV{HTTP_HOST} : "http://" . $ENV{HTTP_HOST}; +print "https_url = " . $config{httpd_builtin}->{https_url} . "
"; +$config{url} = ($ENV{HTTPS} || ($config{httpd_builtin}->{https_url} || "n") eq "y") ? "https://" . $ENV{HTTP_HOST} : "http://" . $ENV{HTTP_HOST}; $config{hostname} = $config{hostname} || $ENV{SERVER_NAME}; if(!($config{hostname})) { # called from the command line $config{hostname} = "127.0.0.1";