Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Apache 2.2.6 - Problems with vhosts
Date: Wed, 12 Nov 2008 09:20:03
Message-Id: 20081112091944.66e9112a@digimed.co.uk
In Reply to: [gentoo-user] Apache 2.2.6 - Problems with vhosts by Gololo
1 On Wed, 12 Nov 2008 09:59:59 +0100, Gololo wrote:
2
3 > Now I have a user who adquired a domain (let's say: www.example.com) and
4 > wants to redirect it to his user folder. For this, I edited the file:
5 > 00_default_vhost.conf
6 > It looks like this:
7 >
8 > --------------------------------------------------------------------------------------------
9 > <IfDefine DEFAULT_VHOST>
10 > Listen 80
11 > NameVirtualHost *:80
12 >
13 > <VirtualHost *:80>
14 > ServerName myserver.university.edu
15 > Include /etc/apache2/vhosts.d/default_vhost.include
16 > <IfModule mpm_peruser_module>
17 > ServerEnvironment apache apache
18 > </IfModule>
19 > </VirtualHost>
20 >
21 > <VirtualHost *:80>
22 > DocumentRoot /home/group1/user1/public_html/
23 > ServerName example.com
24 > ServerAlias www.example.com
25 > </VirtualHost>
26 >
27 > <VirtualHost *:80>
28 > DocumentRoot /home/group1/user1/public_html/subdomain1
29 > ServerName subdomain1.example.com
30 > </VirtualHost>
31 > </IfDefine>
32
33 You don't edit 00_default_vhost.conf, that for teh default setting (hint:
34 look at the name of the file). Put your settings in 01_domain.conf,
35 02_domain2.conf etc.
36
37 Secondly, you have only defined more default setups here. And where isthe
38 Directory stanza for the user dir? The contents of 01_example.com.conf
39 should be along the lines of
40
41 <VirtualHost www.example.com:80>
42 ServerAlias example.com
43 DocumentRoot "/home/group1/user1/public_html"
44 <Directory "/var/www/stfw.net/htdocs">
45 Options Indexes
46 order allow,deny
47 Allow from all
48 </Directory>
49 </VirtualHost>
50
51
52 --
53 Neil Bothwick
54
55 WinErr 011: Window open - Do not look outside

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Apache 2.2.6 - Problems with vhosts Gololo <gololo@×××××.com>