0

Sorry this is a repost, the original question got moved to here form stack overflow and for some reason I can't comment or respond to answers on that one anymore.

Hi all, I'm trying to set up a virtual host for redmine.SITENAME.com. I've edited the httpd.conf file and now I'm trying to edit my DNS settings. However, I'm not sure exactly what to do. Here's an snippet of what's already in the named.conf file (the file was made by someone else who is unreachable):

zone "SITENAME.com" {
    type master;
    file "SITENAME.com";
    allow-transfer {
            ip.address.here.00;
            common-allow-transfer;
    };
};

I figure if I want to get redmine.SITENAME.com working, I need to copy that entry and just replace SITENAME.com with redmine.SITENAME.com but will that work? I was under the impression I needed a .db file but I don't see any reference to one in the current named.conf file. I also don't see any .db files or files named SITENAME in named.conf's directory. Any ideas where these illusive pre-existing db files could be?

1
  • 1
    I've merged the questions for you. For future reference, the best thing to do if that happens is flag for mod attention and we'll get you fixed up instead of reposting :)
    – Zypher
    Dec 31, 2010 at 3:47

1 Answer 1

4

This question is better suited for serverfault. Do post this kind of admin and server related questions there in the future.

But since you posted here for now, here's the solution:

The file where your domain specific settings should go is specified on this line: file "SITENAME.com";

Thus you need to open/create SITENAME.COM zone db file in the same directory where you opened named.conf.

A typical zone db config would look like this:

    @ IN SOA mydomain.name.  postmaster.mydomain.name. (
    19990811    ; Serial number
    3600        ; 1 hour refresh
    300     ; 5 minutes retry
    172800      ; 2 days expiry
    43200 )     ; 12 hours minimum

    IN NS       mydomain.name.
    IN NS       isp.domain.name.com.

    IN MX       mail.mydomain.name.

    IN HINFO    Pentium/350 LINUX

; A list of machine names & addresses
    spock.mydomain.name.    IN A    123.12.41.40   ; OpenVMS Alpha
    mail.mydomain.name.     IN A    123.12.41.41   ; Linux (main server)
    kirk.mydomain.name.     IN A    123.12.41.42   ; Windows NT (blech!)

; Including any in our other class C's
    twixel.mydomain.name.   IN A    126.27.18.161  ; Linux test machine
    foxone.mydomain.name.   IN A    126.27.18.162  ; Linux devel. kernel

; Alias (canonical) names
    gopher          IN CNAME    mail.mydomain.name.
    ftp     IN CNAME    mail.mydomain.name.
    www     IN CNAME    mail.mydomain.name.

And if your current domain name resolves you most probably have some kind of configuration already in SITENAME.COM file. Then all you need to do in order to add the subdomain redmine.SITENAME.com is to do a CNAME or FORWARD record for that like so:

redmine     IN CNAME    SITENAME.COM.

or

redmine     IN A    192.168.0.1

Do modify the ip address or CNAME to what you need.

For more in-depth info check this article on tldp.org

2
  • Thanks for the great answer, I just have a quick follow up. Any idea why are there no other .db files in the directory you mention, despite there being other domains mentioned in the named.conf file?
    – Jake
    Jan 1, 2011 at 20:51
  • You should check the respective zone records file entries for those domains in named.conf. If they are specified and those files don't exist that will most probably generate errors in BIND. You should be able to see those in the logs or upon starting the server. If no file entry is specified for those domain in named.conf those domains most probably weren't configured and left as is or they are slave or forward zones. zytrax.com/books/dns/ch7/zone.html#file
    – Shinnok
    Jan 1, 2011 at 21:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .