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.

Problem with parked domain, can't remove :(

Discussion in 'General Discussion' started by zodiac9797, Apr 17, 2011.

  1. zodiac9797

    zodiac9797 Member

    Joined:
    Apr 17, 2011
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    I have accidentally parked domain with "www" (www.xydomain.com) thru WHM & now I can't remove parked domain. In WHM I can remove it from DNS zone, but when I login to cpanel account domain is still there under parked domains. When I click REMOVE parked domain I receive error message:
    "Error from park wrapper: Unable to find out which user owns the parked domain www.xydomain.com".

    How can I remove this domain? :confused:
     
  2. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    You would need to remove the domain from /etc/httpd/conf/httpd.conf as well as from /etc/userdomains (AFAIK)
     
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Manual modifications to /usr/local/apache/conf/httpd.conf (which is symlinked to /etc/httpd/conf/httpd.conf file) will be reverted on the next Apache recompile via EasyApache or whenever you rebuild Apache using /scripts/rebuildhttpdconf script.

    As such, you would instead need to edit the file at /var/cpanel/userdata/username/main location (please note that username is the cPanel username for the account) after backing it up, then remove the www.xydomain.com as a parked domain in that file:

    Code:
    cd /var/cpanel/userdata/username/
    cp main main.bak
    vi main
    The file will look like the following for the contents:

    Code:
    --- 
    addon_domains: {}
    
    main_domain: cptestj2.com
    parked_domains: []
    
    sub_domains: []
    You'd simply return the file to looking like it should for the parked domain entry when it has no parked domain listed. If you have another parked domain, it would look like this with multiple parked domains:

    Code:
    --- 
    addon_domains: {}
    
    main_domain: cptestj2.com
    parked_domains:
      - parkeddomain1.com
      - parkeddomain2.com
    sub_domains: []
    In that instance, remove the one showing the www.xydomain.com part, but do not remove the other parked domain(s) you have.

    You would then copy the Apache configuration, rebuild it and restart it:

    Code:
    cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak110419
    /scripts/rebuildhttpdconf
    /etc/init.d/httpd restart
    You should also remove any DNS#=www.xydomain.com entry in /var/cpanel/users/username location, which builds the entries for /etc/userdomains, /etc/trueuserdomains and /etc/domainusers files. Please note that DNS# would be a DNS line with some number like DNS5= for the parked domain entry and again username is the cPanel username for the account. Before editing the file, please ensure to copy a backup of it:

    Code:
    cd /var/cpanel/users
    cp username username.bak
    vi username
    Upon editing that file, you'd want to push the changes you'd made using the following script:

    Code:
    /scripts/updateuserdomains
     
Loading...

Share This Page