1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<VirtualHost www.test.de>
DocumentRoot /usr/local/htdocs/test.de
ServerName www.test.de
ScriptAlias /cgi-bin/ "/usr/local/htdocs/test.de/cgi-bin/"
<Directory "/usr/local/htdocs/test.de/secure">
AuthName "Mein sicherer Bereich"
AuthType Basic
AuthUserFile /usr/local/htdocs/test.de/secure/.htpasswd
require valid-user
</Directory>
<Location "/cgi-bin">
AllowOverride AuthConfig
Options +ExecCGI -Includes +Indexes
SetHandler cgi-script
</Location>
</VirtualHost>
Funktioniert aber nur mit einem NamenServer.
Ich hab mir eine test.de.zone erstellt die auch meinen localhost zeigt.
Ausschnitt /etc/named.conf:
zone "test.de" in {
type master;
file "test.de.zone";
};
Und die test.de.zone:
$TTL 1D
$GENERATE 1-250 client-$ A 192.168.0.$
@ IN SOA server.lan.de. server.lan.de. (
2003020601
3H
15M
1W
1D )
IN NS server
IN MX 0 server
server IN A 192.168.0.251
www IN CNAME server
ftp IN CNAME server
;
Gruß Alex