On 11/10/05, Martin Lyberg <martin.lyberg@xxxxxxxxx> wrote: > On 11/10/05, Joshua Slive wrote: > > > 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> > > > > Hi Joshua, > > I'm not quite sure i understand the syntax. Where would i put this: > > <Location /> > Deny from all > </Location> > > Inside both of my VHosts? The sites are two different ones, and i don't > want a user to access any of the sites if he types the ip directly. He must > type the correct adress to access a site. Hmmm... Did you read the FAQ entry? Anyway, to be extremely explicit, keep the exact config you already have but add the following immediately BEFORE the existing <VirtualHost> sections. This works because the first listed name-based virtual host catches all non-matching hostnames. <VirtualHost *:80> ServerName ip.ip.ip.ip <Location /> Order allow,deny Deny from all Satisfy all </Location> ErrorDocument 403 "There is no website here; go away." </VirtualHost> 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