I have a server (Ubuntu 14.04) where I host several websites.
I have added the following Apache2 configuration files in /etc/sites-available; and I have enabled those sites (symlink to /etc/sites-enabled):
<VirtualHost *:80> ServerName www.domain1.com ServerAlias domain1.com DocumentRoot /var/www/domain1.com/www/ </VirtualHost>
<VirtualHost *:80> ServerName www.domain2.com ServerAlias domain2.com DocumentRoot /var/www/domain2.com/www/ </VirtualHost>
However, when I point my browser directly to the IP of the server, Apache2 seems to match the first virtual host file included (ie www.domain1.com.conf).
Is there any way to disable this, or alternatively how would a 000-default.conf file (which would be loaded first) look like to force apache to close the HTTP connection without returning any data?