2 php-fpm processes with the same version

unloco asked:

I would like to spawn two php-fpm processes (one with xdebug and one without) to make pages load faster

I intend to switch between php-fpm sockets based on the XDEBUG_SESSION cookie

Example code /etc/apache2/conf-available/php7.2-fpm.conf

<FilesMatch ".+\.ph(ar|p|tml)$">
          SetHandler "proxy:fcgi://"
          SetHandler "proxy:fcgi://"

I know how to configure php-fpm /etc/php/7.2/fpm/pool.d/www.conf

listen =

But I have no idea how to spawn multiple (or just two) php-fpm processes.
If there is a simpler way, please let me know.

My answer:

Make a second php-fpm pool with the changed settings that you want. You only have one which you named www. Choose a different name for the second one.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.