Forum Moderators: phranque
If multiple virtual hosts contain the best matching IP address and port, the server selects from these virtual hosts the best match based on the requested hostname. If no matching name-based virtual host is found, then the first listed virtual host that matched the IP address will be used. As a consequence, the first listed virtual host for a given IP address and port combination is the default virtual host for that IP and port combination.
<VirtualHost 123.45.67.89:80>
ServerName example.com
ServerAlias foo.com bar.com etc.com
DocumentRoot /home/example/public_html
ServerAdmin webmaster@example.com
UseCanonicalName Off
blah blah blah
</VirtualHost> # !
# DO NOT EDIT. AUTOMATICALLY GENERATED. USE INCLUDE FILES IF YOU NEED TO MAKE A CHANGE
# !
#
# Direct modifications to the Apache configuration file WILL be lost upon subsequent
# regeneration of this configuration file, or an Apache update.
#
# To have your modifications retained, you should create/edit administrator-specific
# include files:
#
# /etc/apache2/conf.d/includes/pre_main_global.conf
# /etc/apache2/conf.d/includes/pre_virtualhost_global.conf
# /etc/apache2/conf.d/includes/post_virtualhost_global.conf
<IfModule proxy_fcgi_module>
<FilesMatch \.(phtml|php[0-9]*)$>
SetHandler proxy:unix:/opt/cpanel/ea-php74/root/usr/var/run/php-fpm/blahblahblah.sock|fcgi://example.com
</FilesMatch>
</IfModule> A ServerName should be specified inside each <VirtualHost> block. If it is absent, the ServerName from the "main" server configuration will be inherited.