Author Topic: Setting up nameservers and DNS for VPS, running multiple websites on a single IP  (Read 2322 times)

Kaspis

  • Newbie
  • *
  • Posts: 1
    • View Profile
Hello, first, I would like to thank David Fava for patience and in deep explanations  of how to setup dns of my vps server.
To save other beginner users and Davids time I will at least make a summary of what I have found out during my vps setup:

These instructions exactly fits for users, who want to register their main domain (e.g. supplier.com) with his VPS and run his own nameservers (ns1.supplier.com and ns2.supplier.com), which he will use to park all other websites.

1. Running your own nameservers:
ns1.supplier.com will be on your main IP: xxxxxxxxxxx
purchase second IP adress (yyyyyyyyyy) for ns2.supplier.com

add new newtwork alias:
append /etc/network/interfaces file with info about new domain (green text):

auto eth0
iface eth0 inet static
 address xxxxxxxxxxxx
 netmask 255.255.255.0
 gateway 94.141.20.12

auto eth0:0
iface eth0:0 inet static
address yyyyyyyyyyy
netmask 255.255.255.0


2. Create DNS zone for main domain and nameservers:
zone: supplier.com
ns1:   ns1.supplier.com
ns2:   ns2.supplier.com
IP: xxxxxxxxxxxx

some records will be made automatically (atleast with ISPconfig)
add additional records for nameservers:
A ns1 => xxxxxxxxxxxxx
A ns2 => yyyyyyyyyyyyy

3. In your supplier.com domain registrar write nameservers with glue record for supplier.com:
NS                                    IP
ns1.supplier.com   xxxxxxxxxxxxxxxxxx
ns2.supplier.com   yyyyyyyyyyyyyyyyyy


5. Adding new websites to your vps
Create the website in your ISPConfig panel (ISPConfig will automatically setup Apache directives of where in the server to find the new website)

add new DNS zone for newdomain.com:
zone: newdomain.com
ns1:   ns1.supplier.com
ns2:   ns2.supplier.com
IP: xxxxxxxxxxxx

in your newdomain.com registrar write nameservers (no need for glue record) for newdomain.com:
NS 
ns1.supplier.com
ns2.supplier.com


I hope someone will find it useful, good luck :)

Whitenoise

  • Administrator
  • Full Member
  • *****
  • Posts: 144
    • View Profile
Thanks for your contribution! I hope this will help out other users with the same problem :)