Since Php v5.6 the Upstream (Debian) packages of PHP support side-by-side install.
Install the versions you want, and then use a per-php-version apache config file you include in the vhosts you want it for:
Enable proxy_fcgi:
a2enmod proxy_fcgi
AddHandler proxy:unix:/run/php/php5.6-fpm.sock|fcgi://localhost;php5.6 .php
AddHandler proxy:unix:/run/php/php7.0-fpm.sock|fcgi://localhost;php7.0 .php
So each block would be then:
5.6:
fastcgi_pass unix:/var/run/php/php5.6-fpm.sock;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
Since Php v5.6 the Upstream (Debian) packages of PHP support side-by-side install.
Install the versions you want, and then use a per-php-version apache config file you include in the vhosts you want it for:
Enable proxy_fcgi:
php5.6.conf: php7.0.conf: Edit: brain-shart. You want nginx. Similar concept - point to the correct FastCGI socket in each block.So each block would be then:
5.6:
7.0: Etc.