Skip to main content

CWP DNS Part 1 : How to Configure DNS properly for CentOS WebPanel on CentOS 7.6

After hosting my parent domain on CWP7.admin, I am getting dns error and i'm not able access my server using my server FQDN but i can access using my server IP.
So what can i do for that problem ?

Yes, you have to fix the error .

Environment Details:
Distro Name: CentOS Linux release 7.6.1810 (Core)
CentOS-Web Panel version: CWP7.admin
CWP version:
WebServer: Apache Only

1.Change Hostname Permanently:
# hostnamectl set-hostname
# hostnamectl
   Static hostname:
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 7400071490ea4f7d931374824ad4b52c
           Boot ID: 6e1f2d76495d4b318c25c4a1195aa130
    Virtualization: vmware
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-862.14.4.el7.x86_64
      Architecture: x86-64 
It also writes this information to the /etc/hostname file as well.
# cat /etc/hostname
2.One thing the hostnamectl command doesn’t do is modify the /etc/hosts file, so we’ll still need to do that
# vi /etc/hosts   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6     host
:x  (save & quit)

# vi   /etc/sysconfig/network
# Created by anaconda
:x  (save & quit) 
# vi  /etc/resolve.conf
# Generated by NetworkManager
:x  (save & quit)
3.Restart The services
# systemctl enable  systemd-hostnamed
# systemctl restart systemd-hostnamed

# systemctl enable  network.service
# systemctl restart network.service
# systemctl restart NetworkManager
4.SetUp NameServers: Goto DNS Functions >> Edit Nameserver IPs
5.Restart the name server again
# systemctl restart named
Job for named.service failed because the control process exited with error code. See "systemctl status named.service" and "journalctl -xe" for details. 
So We are getting the same problem hat's why my parent domain and below the link is not accessible :
6. Follow >> CWP DNS Part 2