The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How can i remove a domain?

Discussion in 'General Discussion' started by DannyD, Jun 18, 2009.

  1. DannyD

    DannyD Member

    Joined:
    Dec 5, 2008
    Messages:
    16
    Likes Received:
    1
    Trophy Points:
    3
    How can I completely remove a domain with SSH? I have an addon domain and it keeps on telling me that the domain still exists in the httpd.conf i terminated the account and deleted the DNS zones. Any idea?
     
  2. PlatinumServerM

    PlatinumServerM Well-Known Member
    PartnerNOC

    Joined:
    Jul 10, 2005
    Messages:
    397
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    New Jersey, USA
    cPanel Access Level:
    Root Administrator
    You will have to check in all the places that it adds entries in, such as the named.conf, httpd.conf, cpanel user directory, etc.

    If it says it's in the httpd.conf, then open that file and search for the domain name and see if anything is found.
     
  3. DannyD

    DannyD Member

    Joined:
    Dec 5, 2008
    Messages:
    16
    Likes Received:
    1
    Trophy Points:
    3
    I found the domain in the httpd.conf but there is so much things with that domain i dont know what to delete lol
     
  4. InstaCarma_Tech

    InstaCarma_Tech Well-Known Member

    Joined:
    Apr 22, 2009
    Messages:
    228
    Likes Received:
    1
    Trophy Points:
    18
    If it is add-on domain then more often than not, you will see a VirtualHost entry corresponding to addondomain.maindomain.com . You can delete this entire VirtualHost entry. And if you had created sub-domains for this add-on domain then there will be more VH entries.
     
  5. DannyD

    DannyD Member

    Joined:
    Dec 5, 2008
    Messages:
    16
    Likes Received:
    1
    Trophy Points:
    3
    What i did is found everything in httpd related to that domain and deleted it. then i just rebuild httpd.conf and everything worked like a charm.
     
  6. InstaCarma_Tech

    InstaCarma_Tech Well-Known Member

    Joined:
    Apr 22, 2009
    Messages:
    228
    Likes Received:
    1
    Trophy Points:
    18
  7. logicsupport

    logicsupport Well-Known Member

    Joined:
    Jun 5, 2007
    Messages:
    138
    Likes Received:
    0
    Trophy Points:
    16
    How to remove a domain completely

    You need to confirm the domain details are not present in the following files, if they are present remove the entries and try again.

    /etc/named.conf
    /var/named/zone
    /usr/local/apache/conf/httpd.conf ( Virtual host section)
    /etc/userdomains
    /etc/trueuserdomains
    /etc/localdomains
    /etc/remotedomains
    /etc/trueuserowners
    /etc/valiases/domainname
    /var/cpanel/users/username
    /etc/vdomainaliases
    /etc/passwd
    /etc/shadow
    /etc/vfilters
    /etc/vftp
    /etc/vmail
     
  8. romulob

    romulob Active Member
    PartnerNOC

    Joined:
    Apr 29, 2008
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    Next time you need to do that, just type /scripts/killvhost domain.tld
     
Loading...

Share This Page