Page 1 of 1

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

Posted: Mon Oct 03, 2016 10:21 am
by jeniffer
I am getting the error 'Domain already exists in Apache Configuration' while trying to add the domain in cPanel.

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

Posted: Mon Oct 03, 2016 12:09 pm
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