CPanel – det gick inte att ta bort underdomänen

I was unable to remove a subdomain from my Cpanel giving me the fel:

There was a problemet removing the subdomain

To fix the issue I carried out the following steps:

1. Säkerhetskopiering the following files:

/var/cpanel/userdata/username/main
/var/cpanel/userdata/username/sub.maindomain.com
/var/cpanel/users/username
/var/named/maindomain.com.db
/var/cpanel/userdata/wineinns/sub.domain.com
/var/cpanel/userdata/wineinns/sub.domain.com.cache
/usr/local/apache/conf/httpd.conf

2. Remove all lines containing the subdomain from /var/cpanel/userdata/username/main:

vim /var/cpanel/userdata/username/main

3. Remove the subdomain fil completely from /var/cpanel/userdata/username/:

rm /var/cpanel/userdata/username/sub.maindomain.com

4. Remove all lines containing the subdomain from /var/cpanel/users/username:

vim /var/cpanel/users/username

5. Remove all lines containing the subdomain from /var/named/maindomain.com.db:

vim /var/named/maindomain.com.db

6. Remove subdomain files from /var/cpanel/userdata/wineinns/:

rm /var/cpanel/userdata/wineinns/sub.domain.com
rm /var/cpanel/userdata/wineinns/sub.domain.com.cache

7. Now we need to rebuild some files and restart apache:

/scripts/rebuildhttpdconf
/etc/init.d/httpd restart
/scripts/updateuserdomains

Now login to your CPanel interface and check the subdomain is removed.

If not try and add the same subdomain again and then remove. This worked for me.

That should be it gone.

 

 

Lämna ett svar