Skip to content

Switching to PHP-version-agnostic socket file #17890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 10, 2023
Merged
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
8 changes: 4 additions & 4 deletions setup/web_server_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The **minimum configuration** to get your application running under Nginx is:
# }

location ~ ^/index\.php(/|$) {
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_pass unix:/var/run/php/php-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;

Expand Down Expand Up @@ -265,7 +265,7 @@ Apache with PHP-FPM
To make use of PHP-FPM with Apache, you first have to ensure that you have
the FastCGI process manager ``php-fpm`` binary and Apache's FastCGI module
installed (for example, on a Debian based system you have to install the
``libapache2-mod-fastcgi`` and ``php7.4-fpm`` packages).
``libapache2-mod-fastcgi`` and ``php<version>-fpm`` packages).

PHP-FPM uses so-called *pools* to handle incoming FastCGI requests. You can
configure an arbitrary number of pools in the FPM configuration. In a pool
Expand All @@ -280,7 +280,7 @@ listen on. Each pool can also be run under a different UID and GID:
group = www-data

; use a unix domain socket
listen = /var/run/php/php7.4-fpm.sock
listen = /var/run/php/php-fpm.sock

; or listen on a TCP socket
listen = 127.0.0.1:9000
Expand Down Expand Up @@ -378,7 +378,7 @@ instead:

.. code-block:: apache

FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi -socket /var/run/php/php7.4-fpm.sock -pass-header Authorization
FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi -socket /var/run/php/php-fpm.sock -pass-header Authorization

.. _`Apache documentation`: https://httpd.apache.org/docs/
.. _`FastCgiExternalServer`: https://docs.oracle.com/cd/B31017_01/web.1013/q20204/mod_fastcgi.html#FastCgiExternalServer
Expand Down