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)$">
<If "%{HTTP_COOKIE} =~ /XDEBUG_SESSION=PHPSTORM/">
SetHandler "proxy:fcgi://127.0.0.1:9000"
</If>
<Else>
SetHandler "proxy:fcgi://127.0.0.1:9001"
</Else>
</FilesMatch>
I know how to configure php-fpm /etc/php/7.2/fpm/pool.d/www.conf
listen = 127.0.0.1:9000
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.