Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions install/fpm/configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,15 @@
'ip.add.re.ss:port', 'port', '/path/to/unix/socket'. This option is
mandatory for each pool.
</para>
<warning>
<simpara>
Prefer Unix sockets over TCP sockets when the web server runs on
the same host. If a TCP socket must be used, ensure it is not
exposed to untrusted networks and restrict access using
<link linkend="listen-allowed-clients">listen.allowed_clients</link>.
An exposed FastCGI endpoint allows arbitrary code execution.
</simpara>
</warning>
</listitem>
</varlistentry>
<varlistentry xml:id="listen-backlog">
Expand Down
24 changes: 20 additions & 4 deletions install/fpm/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
<chapter xml:id="install.fpm" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>FastCGI Process Manager (FPM)</title>
&fpm.intro;
<warning>
<simpara>
PHP-FPM must not be publicly exposed to the network. A FastCGI
endpoint that is accessible from untrusted sources allows
<emphasis>arbitrary code execution</emphasis>. When using TCP
sockets, restrict access using the
<link linkend="listen-allowed-clients">listen.allowed_clients</link>
directive to allow connections from the web server only. Prefer
Unix sockets over TCP sockets when the web server runs on the same
host, as they can be protected with filesystem permissions. When
using Docker or similar container setups, do not expose PHP-FPM
ports to the host or external networks; communicate between
containers using an internal network instead.
</simpara>
</warning>
<para>
These features include:
<itemizedlist>
Expand Down Expand Up @@ -41,11 +56,12 @@
</para>
</listitem>
<listitem>
<para>
<function>fastcgi_finish_request</function> - special function to finish
request and flush all data while continuing to do something
<simpara>
<function>fastcgi_finish_request</function> and
<function>fastcgi_abort_request</function> - special functions to finish
or abort a request and flush all data while continuing to do something
time-consuming (video converting, stats processing etc.);
</para>
</simpara>
</listitem>
<listitem>
<para>
Expand Down