httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] Combinging static virtual hosts and dynamic VirtualDocumentRoot hosts
Date Tue, 24 Apr 2007 16:42:45 GMT
On 4/24/07, James Davis <james@freecharity.org.uk> 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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message