Named Virtual Host not working
Dan Trainor
info at hostinthebox.net
Sat Jan 28 02:02:46 UTC 2006
Gordon Messmer wrote:
> Ed Landaveri wrote:
>
>> My named virtual host (second one) is not working. Only the default
>> responds.This is my httpd.conf:
>
> ...
>
>> <VirtualHost *:80>
>> ServerName mysite.org
>> </VirtualHost>
>>
>> <VirtualHost *:80>
>> ServerName myothersite.net
>> </VirtualHost>
>
>
> If the name requested by the client doesn't match one of your virtual
> hosts *exactly*, then the default will be used. That's probably the
> issue that you're running in to.
>
> You probably want to use the ServerAlias directive to add names:
>
> <VirtualHost *:80>
> ServerName myothersite.net
> ServerAlias myothersite.net *.myothersite.net
> or:
> ServerAlias myothersite.net www.myothersite.net
> </VirtualHost>
>
Can we assume that the default is the first VirtualHost container, in
order of precidence?
Thanks
-dant
More information about the fedora-list
mailing list