Re: Combinging static virtual hosts and dynamic VirtualDocumentRoot hosts

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

 



On 4/24/07, James Davis <james@xxxxxxxxxxxxxxxxxx> wrote:
Running Debian Etch's Apache/2.2.3

I'd like to be able to setup virtual hosts, accessed via subdomains of
freecharity.org.uk for my users. So instead of
http://www.freecharity.org.uk/~james/ they'll be using
http://james.freecharity.org.uk/.

I already have some, statically defined, virtual hosts on subdomains of
freecharity.org.uk, for example webmail.freecharity.org.uk. My
configuration so far reads something like...

NameVirtualHost *
<VirtualHost *>
        ServerName www.freecharity.org.uk
        DocumentRoot /var/www/main/
        ...
</VirtualHost>
... numerous other virtual hosts ...
<VirtualHost *>
        VirtualDocumentRoot /home/%1/public_html/
</VirtualHost>

However, james.freecharity.org.uk is serving pages from /var/www/main/
instead of /home/james/public_html/. If I place the VirtualDocumentRoot
statement outside of the VirtualHost it swallows up requests for defined
virtual hosts (tries to serve www.freecharity.org.uk from /home/www for
example).

Any suggestions as to how I should VirtualDocumentRoot to play nicely
with static virtual hosts?

Put a
ServerAlias *.freecharity.org.uk
in the last <VirtualHost>

Joshua.

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