I have set up an Apache Server on an a VMWare hosted Linux Mint 21 Server, I have followed the instructions at this blog to run multiple PHP versions (7.4 and 8.1).
Apache is running fine and serving pages on localhost ok but the Virtual Servers just time out with "DNS_PROBE_FINISHED_NXDOMAIN". I'm stumped as to what I'm doing wrong.
Here is the config file for the PHP 7 version:-
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName legacy.local
DocumentRoot /var/www/legacy.local
DirectoryIndex info.php
<Directory /var/www/legacy.local>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<FilesMatch \.php$>
# From the Apache version 2.4.10 and above, use the SetHandler to run PHP as a fastCGI process server
SetHandler "proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost"
</FilesMatch>
ErrorLog ${APACHE_LOG_DIR}/legacy.local_error.log
CustomLog ${APACHE_LOG_DIR}/legacy.local_access.log combined
</VirtualHost>
Here is the config file for the PHP 8 version:-
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName new.local
DocumentRoot /var/www/new.local
DirectoryIndex info.php
<Directory /var/www/new.local>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<FilesMatch \.php$>
# From the Apache version 2.4.10 and above, use the SetHandler to run PHP as a fastCGI process server
SetHandler "proxy:unix:/run/php/php8.1-fpm.sock|fcgi://localhost"
</FilesMatch>
ErrorLog ${APACHE_LOG_DIR}/new.local_error.log
CustomLog ${APACHE_LOG_DIR}/new.local_access.log combined
</VirtualHost>
The error logs show FPM for PHP7 available:-
[08-Dec-2022 13:20:36] NOTICE: fpm is running, pid 801
[08-Dec-2022 13:20:36] NOTICE: ready to handle connections
[08-Dec-2022 13:20:36] NOTICE: systemd monitor interval set to 10000ms
The error logs show FPM for PHP8 available as well:-
[08-Dec-2022 13:20:36] NOTICE: fpm is running, pid 821
[08-Dec-2022 13:20:36] NOTICE: ready to handle connections
[08-Dec-2022 13:20:36] NOTICE: systemd monitor interval set to 10000ms