Whenever you have to debug virtual host setups in Apache, checking the actual running virtual host configuration is a good first step. This can be done with the
-S option used on the Apache binary: It lists all running virtual hosts and performs a syntax check.
On Fedora, RHEL, CentOS the Apache binary can be found on
# /usr/sbin/httpd -S VirtualHost configuration: 22.214.171.124:80 me.example.net (/etc/httpd/conf.d/me.conf:5) 126.96.36.199:80 others.example.net (/etc/httpd/conf.d/others.conf:1) 188.8.131.52:443 others.example.net (/etc/httpd/conf.d/others.conf:38) Syntax OK
On Debian systems the call is almost the same, you just have to source the environment variables upfront, and the binary has a different name for historical reasons:
# source /etc/apache2/envvars # /usr/sbin/apache2 -S VirtualHost configuration: 184.108.40.206:80 me.example.net (/etc/apache2/sites-enabled/me.conf:5) 220.127.116.11:80 others.example.net (/etc/apache2/sites-enabled/others.conf:1) 18.104.22.168:443 others.example.net (/etc/apache2/sites-enabled/others.conf:38) Syntax OK
you might run into an error about user names, in such cases it is helpful to call