Multiple php versions simultaneously on Ubuntu

In your virtualhosts you added a handler, but you didn't set the handler which is why it isn't processed. Add:

<FilesMatch "\.php$">
    SetHandler php-cgi
</FilesMatch>

before </Directory> in each virtual hosts file.