Wellicht een cryptisch titel maar ik wil mijn apache graag configureren zodat:
wwww.domein.nl naar /var/www/domein gaat (website "A")
192.168.1.x (waarbij x het IP van apache) een site toont aan alle computers op het 192.168.1.x subnet (website "B").
Nu heb ik gelezen dat dit met VirtualHosts moet gaan, maar met de volgende configuratie ga ik ipv naar site A naar site B als ik www.domein.nl intoets.
Wat doe ik fout:
wwww.domein.nl naar /var/www/domein gaat (website "A")
192.168.1.x (waarbij x het IP van apache) een site toont aan alle computers op het 192.168.1.x subnet (website "B").
Nu heb ik gelezen dat dit met VirtualHosts moet gaan, maar met de volgende configuratie ga ik ipv naar site A naar site B als ik www.domein.nl intoets.
Wat doe ik fout:
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
| NameVirtualHost *:80 <VirtualHost *:80> ServerName localhost DocumentRoot /var/www/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny Allow from 192.168.1.0/24 Allow from 127 </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> <VirtualHost *:80> ServerName www.domein.nl ServerAlias domein.nl DocumentRoot /var/www/domein/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/domein> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> </VirtualHost> |