On 11/10/05, Martin Lyberg <martin.lyberg@xxxxxxxxx> wrote: > Hi, > > I'm running Apache 2.0 on FC4. I have two websites with two domains on > the same machine. The VirtualHosts work as it should when typing > domain1.com or domain2.com. > > My question is: > > I only want Apache to respond with the correct site if it hits on one > of the two VirtualHosts. If i type the ip of the webserver ie: > http://ip.ip.ip.ip i get to the first VH in list. How can make Apache > only to respond if the correct domains are searched for? That means, > if none of the VirtualHosts is matched, then don't serve any site at > all. > > How can this be done? This is my conf: > > NameVirtualHost *:80 > > <VirtualHost *:80> > DocumentRoot /path/to/domain1 > ServerName domain1.com > </VirtualHost> > > <VirtualHost *:80> > DocumentRoot /path/to/domain2 > ServerName domain2.com > </VirtualHost> In this example: http://httpd.apache.org/docs/1.3/misc/FAQ.html#canonical-hostnames Replace the Redirect with a <Location /> Deny from all </Location> Joshua. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx