title: How to select PHP version 5 and 7 per virtualhost in Apache 2.4 on Debian?
body: <p>Would it be possible to run PHP 7 and PHP 5 simultaneously in Apache 2.4 on Debian 9? I would like to be able to select the PHP version I wish to use per virtualhost. I believe this would be useful considering that some of my websites still use deprecated PHP features. This allows me to perform upgrades per site. How do I achieve something like this?</p>
  
  <p><strong>For example</strong></p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
     ServerAdmin webmaster@localhost
     ServerName mywebsite.com
     DocumentRoot /var/www/mywebsite.com
  
     # UsePHP 7
  &lt;/virtualHost&gt;
  </code></pre>
  
  <p><strong>And</strong> </p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
     ServerAdmin webmaster@localhost
     ServerName mywebsite2.com
     DocumentRoot /var/www/mywebsite2.com
  
     # UsePHP 5
  &lt;/virtualHost&gt;
  </code></pre>