Skip to content

Commit 8440c9e

Browse files
Switching to PHP-version-agnostic socket file
Page: https://symfony.com/doc/5.4/setup/web_server_configuration.html This makes upgrading to a new PHP version so much easier (I just did that). If the PHP version is hardcoded in every domain's config file, it's a hassle to update them. On the other hand: `/var/run/php/php-fpm.sock` is a symlink to the most recently installed PHP version, so this is what most people want probably. I hope this doesn't interfere with the change I did in #17882 on the 6.2 branch.
1 parent 96c5005 commit 8440c9e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

setup/web_server_configuration.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The **minimum configuration** to get your application running under Nginx is:
5656
# }
5757
5858
location ~ ^/index\.php(/|$) {
59-
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
59+
fastcgi_pass unix:/var/run/php/php-fpm.sock;
6060
fastcgi_split_path_info ^(.+\.php)(/.*)$;
6161
include fastcgi_params;
6262
@@ -265,7 +265,7 @@ Apache with PHP-FPM
265265
To make use of PHP-FPM with Apache, you first have to ensure that you have
266266
the FastCGI process manager ``php-fpm`` binary and Apache's FastCGI module
267267
installed (for example, on a Debian based system you have to install the
268-
``libapache2-mod-fastcgi`` and ``php7.4-fpm`` packages).
268+
``libapache2-mod-fastcgi`` and ``php<version>-fpm`` packages).
269269

270270
PHP-FPM uses so-called *pools* to handle incoming FastCGI requests. You can
271271
configure an arbitrary number of pools in the FPM configuration. In a pool
@@ -280,7 +280,7 @@ listen on. Each pool can also be run under a different UID and GID:
280280
group = www-data
281281
282282
; use a unix domain socket
283-
listen = /var/run/php/php7.4-fpm.sock
283+
listen = /var/run/php/php-fpm.sock
284284
285285
; or listen on a TCP socket
286286
listen = 127.0.0.1:9000
@@ -378,7 +378,7 @@ instead:
378378

379379
.. code-block:: apache
380380
381-
FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi -socket /var/run/php/php7.4-fpm.sock -pass-header Authorization
381+
FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi -socket /var/run/php/php-fpm.sock -pass-header Authorization
382382
383383
.. _`Apache documentation`: https://httpd.apache.org/docs/
384384
.. _`FastCgiExternalServer`: https://docs.oracle.com/cd/B31017_01/web.1013/q20204/mod_fastcgi.html#FastCgiExternalServer

0 commit comments

Comments
 (0)