Commit 67fd8ca7 authored by Xavier Guimard's avatar Xavier Guimard

Update FastCGI doc (#1314)

parent 54936267
......@@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "llng-fastcgi-server 1"
.TH llng-fastcgi-server 1 "2018-05-13" "perl v5.26.2" "User Contributed Perl Documentation"
.TH llng-fastcgi-server 1 "2018-05-22" "perl v5.26.2" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......@@ -152,26 +152,85 @@ parts (isolated handlers, portal,...).
.SH "PARAMETERS"
.IX Header "PARAMETERS"
Each parameter can be set by an option or a environment variable.
.IP "\-\-pid \-p ($ENV{\s-1PID\s0}): pid file" 4
.IX Item "--pid -p ($ENV{PID}): pid file"
.IP "\-\-pid \-p ($ENV{\s-1PID\s0}):" 4
.IX Item "--pid -p ($ENV{PID}):"
pid file
.IP "\-\-user \-u ($ENV{\s-1USER\s0}):" 4
.IX Item "--user -u ($ENV{USER}):"
user
.IP "\-\-group \-g ($ENV{\s-1GROUP\s0}):" 4
.IX Item "--group -g ($ENV{GROUP}):"
group
.IP "\-\-proc \-n ($ENV{\s-1NPROC\s0}):" 4
.IX Item "--proc -n ($ENV{NPROC}):"
Number of processus for \s-1FCGI\s0
.IP "\-\-socket \-s ($ENV{\s-1SOCKET\s0}):" 4
.IX Item "--socket -s ($ENV{SOCKET}):"
Unix socket
.IP "\-\-listen \-l ($ENV{\s-1LISTEN\s0}):" 4
.IX Item "--listen -l ($ENV{LISTEN}):"
Listening address (\s-1HOST:PORT, :PORT,\s0 or \s-1PATH\s0)
.IP "\-\-customFunctionsFile \-f ($ENV{\s-1CUSTOM_FUNCTIONS_FILE\s0}):" 4
.IX Item "--customFunctionsFile -f ($ENV{CUSTOM_FUNCTIONS_FILE}):"
file to load for custom functions
.IP "\-\-engine \-e ($ENV{\s-1ENGINE\s0}):" 4
.IX Item "--engine -e ($ENV{ENGINE}):"
Plack::Handler engine, default to \s-1FCGI\s0 (see below)
.IP "\-\-plackOptions:" 4
.IX Item "--plackOptions:"
other options to pass to Plack. This multi-valued parameter must have
\&\*(L"key=value\*(R" values.
.Sp
Example to use FCGI::ProcManager::Constrained instead of default \s-1FCGI\s0 manager
(FCGI::ProcManager):
.Sp
.Vb 2
\& llng\-fastcgi\-server \-u nobody \-g nobody \-s /run/llng.sock \-e FCGI \-n 10 \e
\& \-\-plackOptions manager=FCGI::ProcManager::Constrained
.Ve
.SH "ENGINES"
.IX Header "ENGINES"
By default, llng-fastcgi-server uses \s-1FCGI\s0 (= Plack::Handler::FCGI). Some
other engines can be used:
.SS "\s-1FCGI\s0 (default)"
.IX Subsection "FCGI (default)"
It uses FCGI::ProcManager as manager. Other managers:
.IP "FCGI::ProcManager::Constrained" 4
.IX Item "FCGI::ProcManager::Constrained"
Example to launch it:
.Sp
.Vb 2
\& llng\-fastcgi\-server \-u nobody \-g nobody \-s /run/llng.sock \-e FCGI \-n 10 \e
\& \-\-plackOptions manager=FCGI::ProcManager::Constrained
.Ve
.Sp
You can then set environment values (in /etc/default/llng\-fastcgi\-server file
for example):
.Sp
.Vb 3
\& PM_MAX_REQUESTS=10000
\& PM_SIZECHECK_NUM_REQUESTS=100
\& PM_MAX_SIZE=300000
.Ve
.IP "FCGI::ProcManager::Dynamic" 4
.IX Item "FCGI::ProcManager::Dynamic"
.Vb 2
\& llng\-fastcgi\-server \-u nobody \-g nobody \-s /run/llng.sock \-e FCGI \-n 10 \e
\& \-\-plackOptions manager=FCGI::ProcManager::Dynamic
.Ve
.SS "Other FCGI::ProcManager style engines"
.IX Subsection "Other FCGI::ProcManager style engines"
.IP "FCGI::Engine" 4
.IX Item "FCGI::Engine"
.SS "Event engines"
.IX Subsection "Event engines"
.PD 0
.IP "\-\-user \-u ($ENV{\s-1USER\s0}): user" 4
.IX Item "--user -u ($ENV{USER}): user"
.IP "\-\-group \-g ($ENV{\s-1GROUP\s0}): group" 4
.IX Item "--group -g ($ENV{GROUP}): group"
.IP "\-\-proc \-n ($ENV{\s-1NPROC\s0}): Number of processus for \s-1FCGI\s0" 4
.IX Item "--proc -n ($ENV{NPROC}): Number of processus for FCGI"
.IP "\-\-engine \-e ($ENV{\s-1ENGINE\s0}): Plack::Handler engine, default to \s-1FCGI\s0" 4
.IX Item "--engine -e ($ENV{ENGINE}): Plack::Handler engine, default to FCGI"
.IP "\-\-socket \-s ($ENV{\s-1SOCKET\s0}): Unix socket" 4
.IX Item "--socket -s ($ENV{SOCKET}): Unix socket"
.IP "\-\-listen \-l ($ENV{\s-1LISTEN\s0}): Listening address (\s-1HOST:PORT, :PORT,\s0 or \s-1PATH\s0)" 4
.IX Item "--listen -l ($ENV{LISTEN}): Listening address (HOST:PORT, :PORT, or PATH)"
.IP "\-\-customFunctionsFile \-f ($ENV{\s-1CUSTOM_FUNCTIONS_FILE\s0}): file to load for custom functions" 4
.IX Item "--customFunctionsFile -f ($ENV{CUSTOM_FUNCTIONS_FILE}): file to load for custom functions"
.ie n .IP "\-\-plackOptions: other options to pass to Plack. This multi-valued parameter must have ""key=value"" values." 4
.el .IP "\-\-plackOptions: other options to pass to Plack. This multi-valued parameter must have ``key=value'' values." 4
.IX Item "--plackOptions: other options to pass to Plack. This multi-valued parameter must have key=value values."
.IP "AnyEvent::FCGI" 4
.IX Item "AnyEvent::FCGI"
.IP "FCGI::Async" 4
.IX Item "FCGI::Async"
.IP "\s-1FCGI::EV\s0" 4
.IX Item "FCGI::EV"
.PD
.SH "SEE ALSO"
.IX Header "SEE ALSO"
......
......@@ -185,25 +185,100 @@ Each parameter can be set by an option or a environment variable.
=over
=item --pid -p ($ENV{PID}): pid file
=item --pid -p ($ENV{PID}):
=item --user -u ($ENV{USER}): user
pid file
=item --group -g ($ENV{GROUP}): group
=item --user -u ($ENV{USER}):
=item --proc -n ($ENV{NPROC}): Number of processus for FCGI
user
=item --engine -e ($ENV{ENGINE}): Plack::Handler engine, default to FCGI
=item --group -g ($ENV{GROUP}):
=item --socket -s ($ENV{SOCKET}): Unix socket
group
=item --listen -l ($ENV{LISTEN}): Listening address (HOST:PORT, :PORT, or PATH)
=item --proc -n ($ENV{NPROC}):
=item --customFunctionsFile -f ($ENV{CUSTOM_FUNCTIONS_FILE}): file to load for
custom functions
Number of processus for FCGI
=item --plackOptions: other options to pass to Plack. This multi-valued
parameter must have "key=value" values.
=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
=item --engine -e ($ENV{ENGINE}):
Plack::Handler engine, default to FCGI (see below)
=item --plackOptions:
other options to pass to Plack. This multi-valued parameter must have
"key=value" values.
Example to use L<FCGI::ProcManager::Constrained> instead of default FCGI manager
(L<FCGI::ProcManager>):
llng-fastcgi-server -u nobody -g nobody -s /run/llng.sock -e FCGI -n 10 \
--plackOptions manager=FCGI::ProcManager::Constrained
=back
=head1 ENGINES
By default, llng-fastcgi-server uses FCGI (= L<Plack::Handler::FCGI>). Some
other engines can be used:
=head2 FCGI (default)
It uses L<FCGI::ProcManager> as manager. Other managers:
=over
=item L<FCGI::ProcManager::Constrained>
Example to launch it:
llng-fastcgi-server -u nobody -g nobody -s /run/llng.sock -e FCGI -n 10 \
--plackOptions manager=FCGI::ProcManager::Constrained
You can then set environment values (in /etc/default/llng-fastcgi-server file
for example):
PM_MAX_REQUESTS=10000
PM_SIZECHECK_NUM_REQUESTS=100
PM_MAX_SIZE=300000
=item L<FCGI::ProcManager::Dynamic>
llng-fastcgi-server -u nobody -g nobody -s /run/llng.sock -e FCGI -n 10 \
--plackOptions manager=FCGI::ProcManager::Dynamic
=back
=head2 Other FCGI::ProcManager style engines
=over
=item FCGI::Engine
=back
=head2 Event engines
=over
=item AnyEvent::FCGI
=item FCGI::Async
=item FCGI::EV
=back
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment