diff --git a/library/Icinga/Application/ApplicationBootstrap.php b/library/Icinga/Application/ApplicationBootstrap.php index 38bb11981..e9b6028bb 100644 --- a/library/Icinga/Application/ApplicationBootstrap.php +++ b/library/Icinga/Application/ApplicationBootstrap.php @@ -152,6 +152,9 @@ abstract class ApplicationBootstrap } } $this->configDir = realpath($configDir); + if (!$this->configDir) { + $this->configDir = '/etc/icingaweb'; + } $this->setupAutoloader(); $this->setupZendAutoloader(); diff --git a/library/Icinga/Application/Config.php b/library/Icinga/Application/Config.php index 0336c588d..52d6ebfc6 100644 --- a/library/Icinga/Application/Config.php +++ b/library/Icinga/Application/Config.php @@ -169,7 +169,7 @@ class Config extends Zend_Config throw new ProgrammingError('Windows support has not yet been implemented'); } - if (strpos($path, DIRECTORY_SEPARATOR) === 0 || self::$configDir === false) { + if (strpos(pathinfo($path, PATHINFO_DIRNAME), DIRECTORY_SEPARATOR) === 0) { return $path; }