I have 2 virtual hosts loaded from 2 separate conf files in /etc/httpd/conf.d/ when I point my browser to vhost1.test.com it loads the proper index.html as does vhost2.test.com. However the web server now responds with the 2nd vhost as the servers wildcard domain, if I make a dns entry for foo.test.com the page for vhost2 will load. If I remove the configuration for vhost2 the same behavior now happens for vhost1. What in my configuration is causing the last virtual server loaded to become a wildcard domain? With this configuration apache is also ignoring the default document root of /var/www/html when I point my browser to test.com and instead loading the wildcard. Without either vhost.conf loaded the documents in /var/www/html load as expected.
<VirtualHost *:80> DocumentRoot /vhost1 ServerName vhost1.test.com ErrorLog logs/vhost1-error_log CustomLog logs/vhost1-access_log common <Directory "/vhost1"> order deny,allow Require all granted Allow from localhost 127.0.0.1 192.168. </Directory>
<VirtualHost *:80> DocumentRoot /vhost2 ServerName vhost2.test.com ErrorLog logs/vhost2-error_log CustomLog logs/vhost2-access_log common <Directory "/vhost2"> order deny,allow Require all granted Allow from localhost 127.0.0.1 192.168. </Directory>