Re: mod_vhost_alias conflicting with VirtualHost containers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/10/2007, pavel.stratil-jun@xxxxxxxx <pavel.stratil-jun@xxxxxxxx> wrote:
> Hi people, I have a problem with mod_vhost_alias conflicting with
> VirtualHost containers. This is the relevant part of my conf

Try something like this:

NameVirtualHost *:80

<VirtualHost *:80>
 ServerName dummy
 VirtualDocumentRoot /what/ever
</VirtualHost>

<VirtualHost *:80>
 ServerName specific.name
 DocumentRoot /var/www/specific_site
</VirtualHost>

<VirtualHost *:80>
 ServerName another.specific.name
 DocumentRoot /var/www/another_specific_site
</VirtualHost>

The should work because the latter vhosts will be used when the name
matches exactly, and the first one will be used when there's no
specific match (allowing it to try and figure out the path based on
the host name).

Alternatively, you can put the 'dynamic' host later in the list, using
ServerAlias * to make it the catch-all.

-- 
noodl

---------------------------------------------------------------------
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


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux