apache 2 vhosts question

tim_m

i'm so nice
Joined
Feb 10, 2003
Messages
5,539
i'd like to automatically have user.domain.com point to domain.com/~user but also be able to have seperate sub domains that would take precedence over the user's

currently, i have
VirtualDocumentRoot /home/%1/www/
and after that line include each of the <VirtualHost ...> directives i'd like but no matter what subdomain i enter, it points to the user's home directory. for example, i'd like to have gallery.domain.com point to /srv/www/htdocs/gallery but it points to /home/gallery/www, i tested that by making that directory. i would have expected the <VirtualHost...> to override, but guess i was wrong.
the vhost looks like
Code:
<VirtualHost *>
    ServerName gallery.zero.servequake.com
    DocumentRoot /srv/www/htdocs/gallery

<Directory "/srv/www/htdocs/gallery">
 Options Indexes FollowSymLinks Includes
 AllowOverride All
 Order allow,deny
 Allow from all
</Directory>
</VirtualHost>
if i comment out the VirtualDocumentRoot line, the gallery subdomain works.
 
Back
Top