If no matching virtual host is found, then the first listed virtual host that matches the IP address will be used.
(Apache website on Name-based Virtual Host Support)
Now when a request arrives, the server will first check if it is using an IP address that matches theNameVirtualHost
. If it is, then it will look at each<VirtualHost>
section with a matching IP address and try to find one where theServerName
orServerAlias
matches the requested hostname. If it finds one, then it uses the configuration for that server.
Bad Request
Your browser sent a request that this server could not understand.
Apache/2.2.16 (Debian) Server at my_legit_virtual_host.domain.tld Port 80