mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 08:28:54 +00:00
Lighttpd rewording, remove PHP 5 refs (#1522)
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
This commit is contained in:
parent
96f69db3ae
commit
7006df7c1f
1 changed files with 15 additions and 19 deletions
|
@ -14,19 +14,16 @@
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Fastcgi is the preferred SAPI to connect PHP and Lighttpd. Fastcgi is
|
FastCGI is the preferred SAPI to connect PHP and Lighttpd. FastCGI is
|
||||||
automagically enabled in php-cgi in PHP 5.3, but for older versions configure
|
automagically enabled in php-cgi.
|
||||||
PHP with --enable-fastcgi. To confirm that PHP has fastcgi enabled,
|
|
||||||
<literal>php -v</literal> should contain <literal>PHP 5.2.5 (cgi-fcgi)</literal>
|
|
||||||
Before PHP 5.2.3, fastcgi was enabled on the php binary (there was no php-cgi).
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<sect2 xml:id="install.unix.lighttpd-14.lighttpd-spawn">
|
<sect2 xml:id="install.unix.lighttpd-14.lighttpd-spawn">
|
||||||
<title>Letting Lighttpd spawn php processes</title>
|
<title>Letting Lighttpd spawn php processes</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To configure Lighttpd to connect to php and spawn fastcgi processes, edit
|
To configure Lighttpd to connect to PHP and spawn FastCGI processes, edit
|
||||||
lighttpd.conf. Sockets are preferred to connect to fastcgi processes on
|
<filename>lighttpd.conf</filename>. Sockets are preferred to connect to FastCGI processes on
|
||||||
the local system.
|
the local system.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -55,15 +52,15 @@ fastcgi.server = ( ".php" =>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The bin-path directive allows lighttpd to spawn fastcgi processes dynamically.
|
The <filename>bin-path</filename> directive allows lighttpd to spawn FastCGI processes dynamically.
|
||||||
PHP will spawn children according to the PHP_FCGI_CHILDREN environment
|
PHP will spawn children according to the <envar>PHP_FCGI_CHILDREN</envar> environment
|
||||||
variable. The "bin-environment" directive sets the environment for the
|
variable. The <literal>bin-environment</literal> directive sets the environment for the
|
||||||
spawned processes. PHP will kill a child process after the number of
|
spawned processes. PHP will kill a child process after the number of
|
||||||
requests specified by PHP_FCGI_MAX_REQUESTS is reached. The directives
|
requests specified by <envar>PHP_FCGI_MAX_REQUESTS</envar> is reached. The directives
|
||||||
"min-procs" and "max-procs" should generally be avoided with PHP. PHP
|
<literal>min-procs</literal> and <literal>max-procs</literal> should generally be avoided with PHP. PHP
|
||||||
manages its own children and opcode caches like APC will only share among
|
manages its own children and opcode caches like APC will only share among
|
||||||
children managed by PHP. If "min-procs" is set to something greater than 1,
|
children managed by PHP. If <literal>min-procs</literal> is set to something greater than <literal>1</literal>,
|
||||||
the total number of php responders will be multiplied PHP_FCGI_CHILDREN
|
the total number of php responders will be multiplied <envar>PHP_FCGI_CHILDREN</envar>
|
||||||
(2 min-procs * 16 children gives 32 responders).
|
(2 min-procs * 16 children gives 32 responders).
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
@ -73,7 +70,7 @@ fastcgi.server = ( ".php" =>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Lighttpd provides a program called spawn-fcgi to make the process of
|
Lighttpd provides a program called spawn-fcgi to make the process of
|
||||||
spawning fastcgi processes easier.
|
spawning FastCGI processes easier.
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
|
@ -82,9 +79,9 @@ fastcgi.server = ( ".php" =>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
It is possible to spawn processes without spawn-fcgi, though a bit of
|
It is possible to spawn processes without spawn-fcgi, though a bit of
|
||||||
heavy-lifting is required. Setting the PHP_FCGI_CHILDREN environment var
|
heavy-lifting is required. Setting the <envar>PHP_FCGI_CHILDREN</envar> environment var
|
||||||
controls how many children PHP will spawn to handle incoming requests.
|
controls how many children PHP will spawn to handle incoming requests.
|
||||||
Setting PHP_FCGI_MAX_REQUESTS will determine how long (in requests) each
|
Setting <envar>PHP_FCGI_MAX_REQUESTS</envar> will determine how long (in requests) each
|
||||||
child will live. Here's a simple bash script to help spawn php responders.
|
child will live. Here's a simple bash script to help spawn php responders.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -123,7 +120,7 @@ echo $! > "$PHP_PID"
|
||||||
<title>Connecting to remote FCGI instances</title>
|
<title>Connecting to remote FCGI instances</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Fastcgi instances can be spawned on multiple remote machines in order to
|
FastCGI instances can be spawned on multiple remote machines in order to
|
||||||
scale applications.
|
scale applications.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -140,7 +137,6 @@ fastcgi.server = ( ".php" =>
|
||||||
</example>
|
</example>
|
||||||
</sect2>
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
|
|
Loading…
Reference in a new issue