From 4607a85cf5745bb99a12f4b5e829447d82c09f6e Mon Sep 17 00:00:00 2001 From: Paul Richards Date: Mon, 30 Mar 2015 23:09:24 +0100 Subject: [PATCH] IIS: use 'config' folder within icingaweb root on windows fixes #8916 --- library/Icinga/Application/ApplicationBootstrap.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Application/ApplicationBootstrap.php b/library/Icinga/Application/ApplicationBootstrap.php index e265b91ee..ce5997c50 100644 --- a/library/Icinga/Application/ApplicationBootstrap.php +++ b/library/Icinga/Application/ApplicationBootstrap.php @@ -138,7 +138,13 @@ abstract class ApplicationBootstrap if (array_key_exists('ICINGAWEB_CONFIGDIR', $_SERVER)) { $configDir = $_SERVER['ICINGAWEB_CONFIGDIR']; } else { - $configDir = '/etc/icingaweb2'; + // default configuration path. Use /etc/icingaweb2 on linux + // For config on windows - use config folder within php code + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + $configDir = $baseDir . '/config'; + } else { + $configDir = '/etc/icingaweb2'; + } } } $canonical = realpath($configDir);