Learn about Centmin Mod LEMP Stack today
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:
    7:50 PM
    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

    30,164
    6,784
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,135
    Local Time:
    2:20 AM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1
  3. Cr0w

    Cr0w Member

    165
    9
    18
    Mar 17, 2015
    Iran
    Ratings:
    +13
    Local Time:
    7:50 PM
    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

    30,164
    6,784
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,135
    Local Time:
    2:20 AM
    Nginx 1.13.x
    MariaDB 5.5
    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.
     
    • Like Like x 2
  5. Cr0w

    Cr0w Member

    165
    9
    18
    Mar 17, 2015
    Iran
    Ratings:
    +13
    Local Time:
    7:50 PM
    1.9.x
    5.5
    something like this ?

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

    eva2000 Administrator Staff Member

    30,164
    6,784
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,135
    Local Time:
    2:20 AM
    Nginx 1.13.x
    MariaDB 5.5
    yes
     
    • Like Like x 1