Named Virtual Host not working
Gordon Messmer
yinyang at eburg.com
Sat Jan 28 01:13:14 UTC 2006
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>
More information about the fedora-list
mailing list