mod_vhost_alias

mod_vhost_alias

am 24.05.2007 00:54:14 von Noah

I'm using mod_vhost_alias for virtual hosting with Apache 2.2.2.
It's working fine now. I just create a new directory with the FQDN in
my vhosts
directory and everything is fine. The only wrinkle is that we want all
of our
sites to respond to both the FWDN and the name without the hostname, www.
So
http://www.example.com should be the same as http://example.com.
Currently I do
this with a sym link, but I am working with a lot of sites. I have it
scripted,
but I just don't like looking at the directory listings. Is it
possible to configure
the VirtualDocumentRoot to respond to both www.example.com and
example.com?

My configuration for vhosts looks like this:

UseCanonicalName Off
VirtualDocumentRoot /var/www/vhosts/%0
VirtualScriptAlias /var/www/vhosts/%0/cgi-bin

Options Indexes ExecCGI FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all



Yours,
Noah