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.

Creating a cow failed

Discussion in 'General Discussion' started by Penn, Dec 12, 2012.

  1. Penn

    Penn Member

    Joined:
    Dec 12, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I have just switched over to VPS hosting with Host Gator. I used to use shared and dedicating hosting before & have always used the same domain for my primary domain name. Host Gator transferred all my websites onto the VPS a few days ago and I've been getting to grips with the WHM. I found out yesterday that because all but my primary domains are add-ons, I'm not able to create individual accounts for these domain names, not unless I remove the add-on status. I've tried doing it with one of the websites today but ran into problems. The first thing I did was to delete the DNS zone for the domain I wanted to create an account for. I removed all the files from the server as well. However, when I try and create an account I get the following error message, any ideas what I am doing wrong?

    Account Creation Status: failed
    Sorry, that domain is already setup (remove it from httpd.conf)
     
  2. hgrg

    hgrg Well-Known Member

    Joined:
    Oct 4, 2010
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    log in via whm and make sure that the domain is properly removed from the dns zone.
    after that run a
    /scripts/rebuildhttpdconf
    and
    /scripts/restartsrv_httpd
    after these try to readd the domain again. ive also had problems with removing addon domains before several times...
     
  3. Penn

    Penn Member

    Joined:
    Dec 12, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I have checked and the domain is definitely not in the DNS section

    Sorry for sounding a bit stupid, but how do I run the scripts, I've never done it before :)
     
    #3 Penn, Dec 13, 2012
    Last edited: Dec 13, 2012
  4. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    That is NOT the way to remove an addon domain.
    If you want to remove an addon domain you do it in cPanel.
    Deleting the DNS Zone and files of an addon domain does not remove it in cPanel configuration.
     
  5. Penn

    Penn Member

    Joined:
    Dec 12, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I have tried deleting it from within the C Panel. Three boxes then come up. "The linked FTP accounts "domain.com" has been removed

    "The link subdomain "domain.com. My primary.com" has been removed

    Sorry, you do not control the domain domain.com

    Obviously I haven't filled in the full domain for the sake of brevity

    It just won't delete
     
  6. acenetgeorge

    acenetgeorge Well-Known Member
    PartnerNOC

    Joined:
    Mar 6, 2008
    Messages:
    64
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Southfield, MI
    cPanel Access Level:
    DataCenter Provider
    Check and see if the addon domain is listed in the /var/cpanel/users/USERNAME file, and remove it from there if it is there. If you do edit that file, run '/usr/local/cpanel/scripts/updateuserdomains' to save the changes in cPanel setup files and then try to create the account again.

    The cpanel users file seems to be the main place I have seen orphaned domains.
     
  7. Chris.Bshm

    Chris.Bshm Member

    Joined:
    Oct 20, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    Let me first state that the best practice for removing an addon domain is to simply use the cPanel interface to do so. cPanel performs automated tasks and performs checks at various stages to ensure that it can complete it's action without mishap. That being said, when you begin manually removing entries tied to an account it breaks the ability for cPanel to perform automated tasks.

    The easiest way to resolve it would most likely be to re-add the removed entries and deleting the account via cPanel. However, the places you must strip it from would be:

    /var/named/$domain.tld
    /etc/named.conf
    /etc/userdomains
    /var/cpanel/users/$username
    - There would be a DNS[1-9]=$domain entry that needs to be removed
    /var/cpanel/userdata/$username/main
    /var/cpanel/userdata/$username/$domain.tld

    After that, running the below cPanel scripts would rebuild Apache, cPanel user files, & named.conf

    /scripts/rebuildhttpdconf
    /scripts/rebuildnamedconf
    /scripts/updateuserdatacache --force
    /scripts/updateuserdomains --force
     
Loading...

Share This Page