On Wed, 12 Nov 2008 09:59:59 +0100, Gololo wrote:

> Now I have a user who adquired a domain (let's say: www.example.com) and
> wants to redirect it to his user folder. For this, I edited the file:
> 00_default_vhost.conf
> It looks like this:
> 
> --------------------------------------------------------------------------------------------
> <IfDefine DEFAULT_VHOST>
> Listen 80
> NameVirtualHost *:80
> 
> <VirtualHost *:80>
>         ServerName myserver.university.edu
>         Include /etc/apache2/vhosts.d/default_vhost.include
>         <IfModule mpm_peruser_module>
>                 ServerEnvironment apache apache
>         </IfModule>
> </VirtualHost>
> 
> <VirtualHost *:80>
>      DocumentRoot /home/group1/user1/public_html/
>      ServerName example.com
>      ServerAlias www.example.com
> </VirtualHost>
> 
> <VirtualHost *:80>
>      DocumentRoot /home/group1/user1/public_html/subdomain1
>      ServerName subdomain1.example.com
> </VirtualHost>
> </IfDefine>

You don't edit 00_default_vhost.conf, that for teh default setting (hint:
look at the name of the file). Put your settings in 01_domain.conf,
02_domain2.conf etc.

Secondly, you have only defined more default setups here. And where isthe
Directory stanza for the user dir? The contents of 01_example.com.conf
should be along the lines of

<VirtualHost www.example.com:80>
        ServerAlias example.com
        DocumentRoot "/home/group1/user1/public_html"
        <Directory "/var/www/stfw.net/htdocs">
                Options Indexes
                order allow,deny
                Allow from all
        </Directory>
</VirtualHost>


-- 
Neil Bothwick

WinErr 011: Window open - Do not look outside

Attachment: signature.asc
Description: PGP signature

Reply via email to