Cant Add add-on domain 'Domain already exists in Apache Configuration'

Discussions related with hosting control panels used, which include cPanel, Plesk, Directadmin etc..
Post Reply
jeniffer
Posts: 0
Joined: Wed Sep 21, 2016 3:23 pm

Cant Add add-on domain 'Domain already exists in Apache Configuration'

Post by jeniffer »

I am getting the error 'Domain already exists in Apache Configuration' while trying to add the domain in cPanel.



Martin
Posts: 36
Joined: Fri Sep 16, 2016 10:34 am

Re: Cant Add add-on domain 'Domain already exists in Apache Configuration'

Post by Martin »

1. Log into you server via SSH as root

2. Take a backup of the apache configuration file and remove the virtualhost entry of that domain (if it exists)

3. Remove the DNS zone file of the domain from /var/named/ directory or run the command /scripts/killdns domain.com to delete the DNS entry of the domain.

4. Remove the domain entry from /etc/userdomains

5. Remove all domain entries from /var/cpanel/users directory and from /var/cpanel/userdata

6. Rebuild the apache configuration file after doing the above steps. Command : /scripts/rebuildhttpdconf

7. Update userdomains using cPanel script /scripts/userdomains

8. Restart apache and named service

service httpd restart

service named restart


Martin
Support Staff
Nixtree Solutions
Managed Backups || Server Management
https://www.nixtree.com



Post Reply