On 4/24/07, James Davis <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to