I should have asked here days ago - i've been trying to get multiple versions of PHP-FPM running under different virtual hosts.
System: Centos 7 w/ Centos Web Panel (CWP), PHP 5.6/7.0/7.1/7.2, Apache 2.4
I have my versions of PHP under /opt/alt/phpXX/usr
i.e. /opt/alt/php72/usr
Example virtual host contents (website runs under PHP7.2):-
<Directory "/home/bbb/public_html">
AddHandler application/x-httpd-php72 .php
AllowOverride All
</Directory>
What i've tried so far is adding this to the virtual host...
<IfModule proxy_fcgi_module>
<FilesMatch \.(phtml|php[0-9]*)$>
SetHandler proxy:unix:/opt/alt/php72/usr/var/run/php-fpm/bbb.sock|fcgi://bbb
</FilesMatch>
</IfModule>
But the PHP-FPM service running on the server is the default package installed via yum
(version 5.4.16). Its binary runs from /usr/sbin
and reads from /etc/php-fpm.d/xxx.conf
and /etc/php.ini
.
Question..
How do I start/run the actual PHP-FPM executable located in the appropriate PHP installation i.e. /opt/alt/php72/usr/sbin/php-fpm
?
Many thanks