Re: Addon Domain Matches Primary Domain From Separate Account - I can't delete the ad
Hello OriginalTwist,
You should be able to remove it manually by removing it from the following locations:
/var/cpanel/users/username file
/var/cpanel/userdata/username/main file
/var/cpanel/userdata/username/sub.domain1.com file
Above please replace
username with the cPanel username for the account where the domain is an addon domain, and repalce
sub.domain1.com with the name of the subdomain on that account. Also, please make backups before editing any of these files:
Code:
cp /var/cpanel/users/username /var/cpanel/users/username.bak
cp /var/cpanel/userdata/username/main /var/cpanel/userdata/username/main.bak
In the /var/cpanel/users/username file, you'd simply remove the DNS#=addon.com and DNS#=sub.domain1.com entries when editing it. In the /var/cpanel/userdata/username/main file, you'd be removing the addon.com and sub.domain1.com entries under addon and subdomains areas individually. If that is the only addon and subdomain for the account, please ensure the main file ends up looking like the following after editing it:
Code:
---
addon_domains: {}
main_domain: domain1.com
parked_domains: []
sub_domains: []
For the sub.domain1.com file at /var/cpanel/userdata/username location, you can simply move rather than remove the entries:
Code:
mv /var/cpanel/userdata/username/sub.domain1.com /var/cpanel/userdata/username/sub.domain1.com.bak
After making all the above changes to remove the domain entries, you would then run the following commands:
Code:
cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak110211
/scripts/updateuserdomains
/scripts/rebuildhttpdconf
/etc/init.d/httpd restart
At that point, the addon domain and subdomain entries should no longer appear in the cPanel for that account.
Thanks.