[plug] wierd virtual domain problem

Matt Kemner zombie at networx.net.au
Thu Nov 5 08:54:28 WST 1998


On Wed, 4 Nov 1998, Peter Caffin wrote:

> >IP based or name based? Ping from here seems to say name.
> 
> Spot on :).
> I've lobbed my Apache config files onto it.net.au/~pc/virtualprob/ for
> anyone who's got a bit of time to have a peek.. I've probably missed
> something hideously obvious (Murphy's law in action).

You've got <VirtualHost 203.8.116.41> - try changing that to <VirtualHost
www.ptcc.it.net.au>

Apache tends to look at the name after VirtualHost as well as the
"ServerName" for names to match to - whenever I set up a virtual domain I
always set it up with
<VirtualHost domainname.com.au>
ServerName www.domainname.com.au

and the end result is both "domainname.com.au" and "www.domainname.com.au"
are matched.
(oh and I don't give each virtual host a static IP - figured most browsers
these days pass a "Host:" header. Haven't had any complaints _yet_ and it
saves me over 60 IP addresses, which I don't have a great deal of. (at
least not in the network my webservers are in))

 - Matt Kemner
System Administrator/BOFH        "Words are too feeble,
Networx Internet                  they cannot contain"
(08) 9 345 3377                   Live, "Stage"



More information about the plug mailing list