hello.
i've been fighting with the virtual hosts and dns server for several
days and i gave up. can anyone help me with this mess:
i have the server (debian 2.6.8; eth0 1.2.3.4, eth0:0 1.2.3.5; eth0:1
1.2.3.6) and i want to configure this server like that:
www on 1.2.3.4 with apache 1.3 (domain.com) and two subdomains
(test1.domain.com and test2.domain.com)
ftp on 1.2.3.5
ssh on 1.2.3.6
well - i started with the dns (bind9) to describe particular services
and the domain with the subdomains.
1. do i need to describe the subdomains here or just let the virtual
host to do it?
FILE: named.conf:
[...]
zone "domain.com" {
[...]
file "[...]/db.domain.com";
[...]
FILE: db.domain.com:
$TTL 3600
@ IN SOA ns1.domain.com. root.ns1.domain.com. (
[...]
2. does the 'root' directive determmine the subdomains? (if i use
'root.ns1.domain.com' so that every subdomain starts instead of the
'root' directive?)
ok - then i describe the primary and the secondary dns:
[...]
IN NS ns1.domain.com.
IN NS ns2.domain.com.
[...]
3. and then what? i have sth like this to determine THIS dns server,
right? (should i use 'ns1' instead of '@'?)
@ IN A 1.2.3.4
4. in formal language - everytime if there is the question about the
domain.com the external dns server direct it to 1.2.3.4 ip address which
is ns1.domain.com, right? so then i have to describe ALL of services,
domains, and subdomains in my ns1?
i did it like that:
www IN A ns1 // www service
ftp IN A 1.2.3.5 //ftp service
ssh In A 1.2.3.6 //ssh service
and subdomains:
test1 IN CNAME ns1 // test1.domain.com
test2 IN CNAME ns1 // test2.domain.com
5. shoul i use 'CNAME' directive for the subdomains that refer to the
main domain or use 'A' directive? i'm totally lost

is it possible do determine some comps from a lan in here?
comp1 IN A 192.168.1.1
comp2 IN A 192.168.1.2
///~
6. do i need the reverse address file if i don't have the whole ip
subclass? (just those 3 addresses)
now the configuration of apache:
FILE: httpd.conf
[...]
BindAddress 1.2.3.4
[...]
NameVirtualHost 1.2.3.4 (or domain.com ?)
[...]
<VirtualHost *>
[...]
DocumentRoot /var/www/domain.com
ServerName domain.com
ServerAlias
www.domain.com (DNS: www IN A ns1)
[...]
</VirtualHost>
<VirtualHost *>
[...]
DocumentRoot /home/www/test1
ServerName test1.domain.com
[...]
</VirtualHost>
<VirtualHost *>
[...]
DocumentRoot /home/www/test2
ServerName test2.domain.com
[...]
</VirtualHost>
7. should i use <VirtualHost *> or <VirtualHost test1.domain.com>?
i will be very gratefull for any help as i have been messing about with
it for a long time and tried almost every combination that could work.
but it still doesn't work
thanks in advance.
matt