diff --git a/fastcgi-server/sbin/llng-fastcgi-server b/fastcgi-server/sbin/llng-fastcgi-server index b10cb3ab7c0fd9887f16ecbc91039e70468bf8c7..5dcd246a377cea71ae5a8b3c8be5d57b39e2da6b 100644 --- a/fastcgi-server/sbin/llng-fastcgi-server +++ b/fastcgi-server/sbin/llng-fastcgi-server @@ -12,7 +12,8 @@ our $VERSION = '1.9.9'; our ( $foreground, $engine, $nproc, $pidFile, $socket, $user, - $group, $customFunctionsFile, %plackOptions + $listen, $group, $customFunctionsFile, + %plackOptions ); my %_apps; @@ -23,6 +24,7 @@ $engine ||= $ENV{ENGINE} || 'FCGI'; $nproc ||= $ENV{NPROC} || 7; $pidFile ||= $ENV{PID} || '__FASTCGISOCKDIR__/llng-fastcgi.pid'; $socket ||= $ENV{SOCKET} || '__FASTCGISOCKDIR__/llng-fastcgi.sock'; +$listen ||= $ENV{LISTEN} || undef; $user ||= $ENV{USER}; $group ||= $ENV{GROUP}; $customFunctionsFile ||= $ENV{CUSTOM_FUNCTIONS_FILE}; @@ -34,6 +36,7 @@ GetOptions( 'proc|n=s' => \$nproc, 'pid|p=s' => \$pidFile, 'socket|s=s' => \$socket, + 'listen|l=s' => \$listen, 'user|u=s' => \$user, 'group|g=s' => \$group, 'customFunctionsFile|f=s' => \$customFunctionsFile, @@ -139,6 +142,7 @@ $server->parse_options( '--pid' => $pidFile, '--nproc' => $nproc, '--socket' => $socket, + ( $listen ? ('--listen', $listen) : ()), '--proc-title' => 'llng-fastcgi-server', ( $foreground ? () : '--daemonize' ), '--no-default-middleware', @@ -185,6 +189,8 @@ Each parameter can be set by an option or a environment variable. =item --socket -s ($ENV{SOCKET}): Unix socket +=item --listen -l ($ENV{LISTEN}): Listening address (HOST:PORT, :PORT, or PATH) + =item --customFunctionsFile -f ($ENV{CUSTOM_FUNCTIONS_FILE}): file to load for custom functions