Author Topic: Proper setup for name servers and hostname how?  (Read 1339 times)

0 Members and 1 Guest are viewing this topic.

Proper setup for name servers and hostname how?
« on: June 12, 2018, 05:40:44 AM »
Proper setup for name servers and hostname how?
What i do, frist i read all tutorials and wiki about that and i do this:
First make domain( then i make subdomains, and
For hostname i use
For nameservers i use : my real IP of server) and my real IP of server)
Is it proper configuration and what i missed, bcs for host name still show localhost(our Hostname is: localhost and it resolves to IP: (ERROR: You don't have a valid hostname set!) ?

Thanks for a time.

Re: Proper setup for name servers and hostname how?
« Reply #1 on: March 29, 2019, 04:38:04 PM »
Not sure if this still applies to you.  But maybe it will apply properly to others.

NOTE: Replace [] with your actual domain name.

  • At your domain registrar create custom nameserver records and with the IP address of your server then set your name servers to and
  • On your server in command shell set the hostname to before you install CWP
  • Install CWP
  • On the server in CWP insure your name servers are set to and
  • On the server in CWP setup a DNS zone for and contains NS records defined with values, and an A record = [server_ip], uses the same NS records as ns1 but defines an A record for ns2 rather and ns1.
  • On the server in CWP add a new user named [domain_name] and use as it's domain value your root domain [].  If you have properly set the name server value for CWP and DNS has propagated from your registrar then your DNS should start working properly and you should be able to secure the domain with a LetsEncrypt certificate.  If the IP does not resolve do not attempt to include a LetsEncrypt certificate at that time - wait until the DNS resolves properly and then add the Certificate.

Hope this helps anyone struggling with DNS setup.
« Last Edit: March 29, 2019, 04:42:59 PM by affriedl »

Re: Proper setup for name servers and hostname how?
« Reply #2 on: April 05, 2019, 12:22:14 AM »
First, suppose you're using some kind of vps!
When you created vps, you had to enter a domain name that will be hosted! your example
With your Domain Name provider, enter for your domain, for example, nameservers from your vps provider.
then with your vps provider you enter, for example, to create the server name because you need it when installing cwp test your server neme in terminal with
Code: [Select]
hostname and you shuld get some result

After that, you create ns1 and subdomains with your vps provider. all of these sub domains and srv1 and ns1 and ns2 are set to ip address from the server.
After that, the cwp configures your
hostname to
When registering with cwp log in via
user root is your password
go to dns settings and change ns1 and ns2 for your record and put ip address form server,
Save the configuration and rebuild all users it is mandatory that Bind can work properly. After that, you have your dns