From 93b7b114495e5732c3a6142b741b1c0165339a99 Mon Sep 17 00:00:00 2001 From: Uwe Ebel Date: Tue, 13 Dec 2016 12:02:29 +0100 Subject: [PATCH] Make default listen address for CLI command web serve configureable Signed-off-by: Eric Lippmann resolves #13381 --- application/clicommands/WebCommand.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/application/clicommands/WebCommand.php b/application/clicommands/WebCommand.php index 32d9b4f0a..b8bf82019 100644 --- a/application/clicommands/WebCommand.php +++ b/application/clicommands/WebCommand.php @@ -26,8 +26,7 @@ class WebCommand extends Command // TODO: Sanity check!! if ($socket === null) { - $socket = '0.0.0.0:80'; - // throw new IcingaException('Socket is required'); + $socket = $this->Config()->get('standalone','listen','0.0.0.0:80'); } if ($documentRoot === null) { $documentRoot = Icinga::app()->getBaseDir('public'); @@ -40,7 +39,7 @@ class WebCommand extends Command if ($fork) { $this->forkAndExit(); } - echo "Serving Icingaweb from $documentRoot\n"; + echo "Serving Icinga Web 2 from directory $documentRoot and listening on $socket\n"; $cmd = sprintf( '%s -S %s -t %s %s', readlink('/proc/self/exe'),