Debian 9 stretch introduced a mechanism for two PHP versions to co-exist on one server. This makes sense when newer applications demand PHP 7.x (in my case Yii 2.0.12) while others (older) require 5.x.
A similar question has been asked here, and answered "assuming ... to use php-fpm instead of Apache module". Now I want to continue using apache modules because of the experience with this setup, so other users and me don't want to switch to FPM.
Currently I have both php5-common and php7.1-common (plus related) packages installed. Apache serves PHP5, based on libapache2-mod-php5.
Now I installed:
apt-get install libapache2-mod-php7.1
which ended sucessfully but with the hint: "php5 module already enabled, not enabling PHP 7.1"
This sounds as if the two modules can only work exclusively.
I searched the debian docs but did not find hints on how to activate both and switch between them, per virtualhost. Same for the web, all howto's refer to FPM only.