title: Php version by vhost, apache2
body: <p>I've installed both version php in my server, 5.6 and 7.0. I can switch between versions, but I'd like to set php version by vhost. Default version is php 5.6. Below is example my vhost:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName example.com
      DocumentRoot "/var/www
      PHPINIDir /etc/php/7.0/cli/
      &lt;Directory "var/www"&gt;
          AllowOverride all
          DirectoryIndex index.php
      &lt;/Directory&gt;
  &lt;/VirtualHost&gt;.
  </code></pre>
  
  <p><code>phpinfo()</code> is still displaying version 5.6, but loaded configuration file is from php 7.0. Im using Debian 8.</p>