I'm looking to run both PHP 5.6 and 7.1 in my development server (Debian 9), with Apache. I know that Nginx can easily handle this, but I really need Apache.
Here so confs
# My main configuration file, running with PHP7.1
<VirtualHost xx.xx.xx.xx:80>
ServerName www.mydomain.com
ServerAlias mydomain.com
DocumentRoot /var/www/mydomain.com/html
</VirtualHost>
<VirtualHost xx.xx.xx.xx:80>
ServerName xx.xx.xx.xx
<Directory />
Deny from all
</Directory>
</VirtualHost>
# PHP 5.6
<VirtualHost xx.xx.xx.xx:80>
ServerName foo.mydomain.com
DocumentRoot /var/www/foo.mydomain.com/html
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php/php5.6-fpm.sock"
</FilesMatch>
</VirtualHost>
The 7.1 is working, while 5.6 returns a 404. Thanks !