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.

Permanently fixing broken subdomain

Discussion in 'General Discussion' started by Oldiesmann, Jan 29, 2010.

  1. Oldiesmann

    Oldiesmann Active Member

    Joined:
    Dec 30, 2008
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Cincinnati, Ohio, USA
    I've been having this problem off and on for close to a year now, but just now realized that cPanel was likely the cause.

    I have three domains. When I moved from shared hosting to VPS, I decided to split each of the two addon domains to their own separate accounts just to make things easier to manage. However, I forgot to delete a subdomain from the original domain before doing this.

    Original domain: Oldiesmann's ApologetiX Site
    Subdomain in question: wiki.archiefans.com

    This leads to wiki.archiefans.com basically being an alias for oldiesmann.us. My solution to this is to just edit httpd.conf to remove any references to wiki.archiefans.com, then re-add the subdomain from cPanel under the "archie" account.

    However, I can't get it to stay this way, no matter how many httpd.conf and httpd.conf.bak files I edit. Every few months or so, the changes revert, and I have to spend 5-10 minutes editing httpd.conf again, then re-adding the subdomain.

    I really don't want to go to the trouble of moving things back to an addon domain, then deleting the original subdomain, moving things back to a regular account and adding the subdomain again. Is there a way I can prevent cPanel from reverting these changes?
     
  2. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Please consider submitting a support request; this will allow us to properly investigate and assist in determining the best resolution. Please let me know the ticket number when available so that I may review the specific details and follow-up internally. Thank you. :)
     
  3. Oldiesmann

    Oldiesmann Active Member

    Joined:
    Dec 30, 2008
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Cincinnati, Ohio, USA
    Thanks for the suggestion. I've filed a support ticket. ID is 569602.
     
  4. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Thank you for the report and information. The ticket notes indicated that entries for the sub-domain were found in the cPanel users file and cPanel userdata for the account that was transferred (that owned the same sub-domain on the previous server). After ensuring that only one account contained entries for the sub-domain in the cPanel users file and cPanel userdata the issue was then alleviated. Please note that the Apache configuration of virtual hosts is built largely in part using information from cPanel userdata, thus it was necessary to ensure it was checked and corrected.

    For reference, here are the two directory paths involved:
    Code:
    /var/cpanel/users/
    /var/cpanel/userdata/
    For the cPanel users file, here is an example path:
    Code:
    /var/cpanel/users/username
    For cPanel userdata, here are a few example paths:
    Code:
    /var/cpanel/userdata/username/
    /var/cpanel/userdata/username/main
    /var/cpanel/userdata/username/domain.tld
    /var/cpanel/userdata/username/domain.tld_SSL
    Warning: Extreme caution must be exercised when auditing the aforementioned files and configuration data, ensuring to always save fresh backups before attempting any corrective measures.

    Here are two different examples of how to save a fresh backup of the entire cPanel users directory and the entire cPanel userdata directory:

    Save via an archival copy of the directory:
    Code:
    # cp -av /var/cpanel/users /var/cpanel/users_backup
    # cp -av /var/cpanel/userdata /var/cpanel/userdata_backup
    Save via a bzip2-compressed tar archive:
    Code:
    # cd /var/cpanel
    # tar -cjvf users_backup.tar.bz2 users/
    # tar -cjvf userdata_backup.tar.bz2 userdata/
     
    #4 cPanelDon, Feb 3, 2010
    Last edited: Feb 3, 2010
Loading...

Share This Page