PHP fpm (plusieurs versions de php sur la même machine)
FPM (FastCGI Process Manager, gestionnaire de processus FastCGI) est une alternative à l'implémentation PHP FastCGI avec des fonctionnalités supplémentaires utiles pour les sites très fortement chargés.
Il permet notamment de faire tourner plusieurs versions de php sur un même serveur (apache ou autre), très pratique si on veut éviter les solutions de virtualisation type VirtualBox ou Docker.
En savoir plus
Exemple de config apache2
<Directory /var/www> Options FollowSymLinks AllowOverride All Require all granted Options +Indexes <FilesMatch \.php$> # For Apache version 2.4.10 and above, use SetHandler to run PHP as a fastCGI process server SetHandler "proxy:unix:/run/php/php8.1-fpm.sock|fcgi://localhost" </FilesMatch> </Directory> <Directory /var/www/php8.2> Options FollowSymLinks AllowOverride All Require all granted Options +Indexes <FilesMatch \.php$> # For Apache version 2.4.10 and above, use SetHandler to run PHP as a fastCGI process server SetHandler "proxy:unix:/run/php/php8.2-fpm.sock|fcgi://localhost" </FilesMatch> </Directory> <Directory /var/www/php7.3> Options FollowSymLinks AllowOverride All Require all granted Options +Indexes <FilesMatch \.php$> # For Apache version 2.4.10 and above, use SetHandler to run PHP as a fastCGI process server SetHandler "proxy:unix:/run/php/php7.3-fpm.sock|fcgi://localhost" </FilesMatch> </Directory>
Mot-clés
php versions php