If you’re administrating a Cpanel server and you come across an error message while trying to use cpanel’s domain addon menu and you want to fix that you will need to do the following logged in as root over an ssh connection:
1. Remove dns related stuff in /var/named and /var/named/cache
cpanel:~# rm -f /var/named/mydomain.com.dbcpanel:~# rm -f /var/named/cache/mydomain.com.db
2. Edit the current used httpd.conf on the server and remove all virtualhost domain definitions
cpanel:~# vim /etc/httpd/conf/httpd.conf
# find the mydomain.com Virtualhost definitions and completely remove them
3. Remove any domain occurance in /var/cpanel/users
cpanel:~# cd /var/cpanel/users/
cpanel:/var/cpanel/users# grep -rli 'mydomain.com' *
/var/cpanel/users/hipo
cpanel:~# vim /var/cpanel/users/hipo
# remove in above file any domain related entries
3. Remove anything related to mydomain.com in /etc/userdomains and /etc/localdomains
cpanel:~# vim /etc/userdomains
cpanel:~# vim /etc/localdomains
# again look inside the two files and remove the occuring entries
4. Edit /etc/named.conf and remove any definitions of mydomain.com
cpanel:~# vim /etc/named.conf
# in above file remove DNS configuration for mydomain.com
5. Run /scripts/updateuserdomains
cpanel:~# /scripts/updateuserdomains
6. Delete any valias configurations
cpanel:~# rm -f /etc/valiases/mydomain.com
cpanel:~# rm -f /etc/vdomainaliases/mydomain.com
cpanel:~# rm -f/etc/vfilters/mydomain.com
7. Remove any occurance of mydomain.com in the user directory which experiences the Error from park wrapper: error
Let’s say the user testuser is experiencing the error, in that case you will have to remove:
cpanel:~# rm -rf /home/testuser/public_html/mydomain.com
8. Restart Cpanel
This step is optional though I think it’s also a good practice as it will at least restart the Cpanel webserver (Apache or Litespeed depending on your conf)
cpanel:~# /etc/init.d/cpanel restart
Now try to add up the domain via the Cpanel domain addon interface, hopefully the issue should be fixed by now. If not you might also check if there is no some record about mydomain.com in the mysql server.
Cheers 😉
More helpful Articles
Tags: addon, apache, Cheers, com, comcpanel, connection, cpa, dbcpanel, Delete, DNS, domain definitions, error message, file, hipo, init, litespeed, menu, mydomain, occurance, occuring, Restart, rf, rli, root, scripts, ssh, ssh connection, testuser, userdomainscpanel, vim, wrapper