Ik heb 3 virtual servers
vhost1 werkt (als je naar m'n WAN IP surft)
vhost2 werkt (als je naar m'n dyndns url surft)
vhost3 werkt niet (je krijgt dan de root van vhost1)
dit zijn de directives
en dit is wat apache er over te melden heeft
Omdat vhost2 werkt, heb ik het gevoel dat ik er dichtbij ben, maar aan de andere kant ben ik al 3 dagen bezig en kom ik er maar niet uit.
Hopelijk kan iemand me vertellen waarom vhost3 maar niet wil werken.
code:
1
2
| root@WebServer:/etc/apache2/sites-enabled$ dir vhost1 vhost2.conf vhost3.conf |
vhost1 werkt (als je naar m'n WAN IP surft)
vhost2 werkt (als je naar m'n dyndns url surft)
vhost3 werkt niet (je krijgt dan de root van vhost1)
dit zijn de directives
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
| # vhost1 default - WAN IP gaat hier naar toe
<VirtualHost 80:*>
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options -Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
# vhost2.conf sub.dyndns.com - Deze vhost werkt
<VirtualHost 80:*>
ServerAdmin webmaster@localhost
ServerName sub.dyndns.com # resolved naar m'n WAN
DocumentRoot /home/user/vhost2
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /home/user/vhost2>
Options -Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
# vhost3.conf sub.domein.nl - Deze werkt niet, gaat naar default (/var/www dus)
<VirtualHost 80:*>
ServerAdmin webmaster@localhost
ServerName sub.domein.nl # resolved naar webforward.one.com
DocumentRoot /home/user/vhost3
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /home/user/vhost3>
Options -Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory> |
en dit is wat apache er over te melden heeft
code:
1
2
3
4
5
6
7
8
9
| root@WebServer:~$ apache2ctl -S
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80 is a NameVirtualHost
default server localgost (/etc/apache2/sites-enabled/vhost1:1)
port 80 namevhost localgost (/etc/apache2/sites-enabled/vhost1:1)
port 80 namevhost sub.dyndns.com (/etc/apache2/sites-enabled/vhost2.conf:1)
port 80 namevhost sub.domein.nl (/etc/apache2/sites-enabled/vhost3.conf:1)
Syntax OK |
Omdat vhost2 werkt, heb ik het gevoel dat ik er dichtbij ben, maar aan de andere kant ben ik al 3 dagen bezig en kom ik er maar niet uit.
Hopelijk kan iemand me vertellen waarom vhost3 maar niet wil werken.