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

0 Members and 1 Guest are viewing this topic.

Offline
**
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(site.com)m then i make subdomains ns1.site.com, ns2.site.com and site.site.com
For hostname i use site.site.com
For nameservers i use : ns1.site.com(with my real IP of server) and ns2.site.com(with 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.

Offline
*
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 [domain.com] with your actual domain name.

  • At your domain registrar create custom nameserver records ns1.domain.com and ns2.domain.com with the IP address of your server then set your name servers to ns1.domain.com and ns2.domain.com.
  • On your server in command shell set the hostname to webpanel.domain.com before you install CWP
  • Install CWP
  • On the server in CWP insure your name servers are set to ns1.domain.com and ns2.domain.com
  • On the server in CWP setup a DNS zone for ns1.domain.com and ns2.domain.com
    ns1.domain.com contains NS records defined with values ns1.domain.com, ns2.domain.com and an A record ns1.domain.com = [server_ip], ns2.domain.com 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 [domain.com].  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.
Cheers.
« Last Edit: March 29, 2019, 04:42:59 PM by affriedl »

Offline
*
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 site.com
With your Domain Name provider, enter for your domain, for example, site.com nameservers from your vps provider.
then with your vps provider you enter, for example, srv1.site.com 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 ns2.site.com 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
Quote
hostname to srv1.site.com
reboot
When registering with cwp log in via srv1.site.com:2030
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