seven questions: virtaul host and the dns server

From: matt (mattu_at_o2.pl)
Date: 01/31/05


Date: Mon, 31 Jan 2005 11:35:02 +0100

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



Relevant Pages

  • Re: cable modem and website on iis 6
    ... My understanding of your post is that you want 1 domain, and 3 subdomains, ... you get some space on a name server. ... request to make it to IIS, you need to open port 80 in the router/firewall. ... > need I a windows 2003 dns server in my local lan for that? ...
    (microsoft.public.inetserver.iis)
  • multiple ip primary dns issue?
    ... "netbios name" is set to 0.7 ... being that the dns server is set to dynamic update, ... i changed the ip address for ns1 to .9 and made the ... section of the dns server properties. ...
    (microsoft.public.windows.server.dns)
  • Re: Active Directory Replication Monitor cant open domaincontroller
    ... If you don't have the tools installed, install them from your server install ... Run dcdiag, netdiag and repadmin in verbose mode. ... Subdomains with every one of them one single DC+Global Catalog. ... I do have transitive trusts between the root domain and the subdomains, ...
    (microsoft.public.win2000.active_directory)
  • Re: ? Own DNS server
    ... > I think I need to look up virtual hosting of the web server. ... So far as domains and subdomains, domains cost money but they are not ... They will provide the DNS to point the URL to your IP ... Setup apache to use name based virtual domains and assign the document root ...
    (comp.os.linux.networking)
  • Re: Complex AD migration
    ... create one new root domain and 2 subdomains. ... On another server, create company1.common.local and on another server ... Copy back AD info and Exchange mailboxes back from the temp.local ... if you've got questions on the scenario I ...
    (microsoft.public.win2000.active_directory)