Welcome to Centmin Mod Community
Register Now

Domains setup for subdomains

Discussion in 'Install & Upgrades or Pre-Install Questions' started by Cr0w, Mar 30, 2016.

Tags:
  1. Cr0w

    Cr0w Member

    165
    9
    18
    Mar 17, 2015
    Iran
    Ratings:
    +13
    Local Time:
    6:47 AM
    1.9.x
    5.5
    hello how should i config my NSD Dns server for making a new cname ( subdomain )

     
  2. eva2000

    eva2000 Administrator Staff Member

    54,859
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    1:17 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  3. Cr0w

    Cr0w Member

    165
    9
    18
    Mar 17, 2015
    Iran
    Ratings:
    +13
    Local Time:
    6:47 AM
    1.9.x
    5.5
    an entry ? exactly what entry ?
    its simply means i must make another zone file ?

    cp /etc/nsd/master/domain.com.zone /etc/nsd/master/subdomain.domain.com.zone

    then edit the : /etc/nsd/nsd.conf and add the zone name ?
     
  4. eva2000

    eva2000 Administrator Staff Member

    54,859
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    1:17 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    no append/add to the NSD zone file i.e. for testdomain.com NSD zone file at /etc/nsd/master/testdomain.com.zone
    Code (Text):
    $TTL 14400
    @       IN      SOA     ns1.testdomain.com.      hostmaster.testdomain.com. (
                                                    2010091500
                                                    14400
                                                    3600
                                                    1209600
                                                    86400 )
    
    ; Nameservers
    testdomain.com.       14400   IN      NS      ns1.testdomain.com.
    testdomain.com.       14400   IN      NS      ns2.testdomain.com.
    
    ; A Records
    testdomain.com.       14400   IN      A       ip1
    ftp                     14400   IN      A       ip1
    localhost       14400   IN      A       127.0.0.1
    mail            14400   IN      A       ip1
    ns1                     14400   IN      A       nsip1
    ns2                     14400   IN      A       nsip2
    pop                     14400   IN      A       ip1
    smtp            14400   IN      A       ip1
    www                     14400   IN      A       ip1
    
    ; MX Record
    testdomain.com.       14400   IN      MX      10 mail
    
    ; TXT Record (for SPF)
    testdomain.com.       14400   IN      TXT     "v=spf1 a mx ip4:ip1 ~all"

    Add an additional DNS A record for subdomain.testdomain.com in typical DNS format to the existing NSD zone file at /etc/nsd/master/testdomain.com.zone and restart NSD service. The existing NSD zone already has DNS A records in same format for testdomain.com, mail, ns1, ns2, pop, smtp, www, ftp etc. You'd have to edit those to be relevant to your domain.
     
  5. Cr0w

    Cr0w Member

    165
    9
    18
    Mar 17, 2015
    Iran
    Ratings:
    +13
    Local Time:
    6:47 AM
    1.9.x
    5.5
    something like this ?

    sub.domain.com 14400 IN A IP1 ?
     
  6. eva2000

    eva2000 Administrator Staff Member

    54,859
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    1:17 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yes