move/create domains outside reseller doc root

Discussion in 'cPanel reseller hosting' started by Dewed, Nov 12, 2009.

  1. Dewed

    Dewed New Member

    I'm basically using a reseller account to host several of my own domains.

    The current directory structure for the child domains is the standard

    Is it possible to move these child domains? Something like
    /home/reseller/child_domain/public_html/ ?

    I can certainly move the files via command line SSH, but where in cpanel can I edit document root for these domains ?
  2. Dan

    Dan Moderator

    Hello Dewed,

    If you don't want the domains to be owned by the reseller then create them under your own WHM account.
  3. Dewed

    Dewed New Member

    Owened..possibly has a different meaning to you. I really dont care who they are owned by, I just want the files outside of the reseller's document root so that I can make separate backups for each domain..

    One domain has already been created by the reseller account, I'd like to move it outside as descibed above before trying to use WHM to migrate more domains, and likely more questions here...

    Sorry, but to me life was much simpler editing httpd.conf files and HUPing apache processes, this pointy clicky world is new to me. The fact that some manual edits to conf files will be overwritten by cpanel just makes things more irritating, since it isn't clear what can and cannot be manually edited.
  4. KH-Paul

    KH-Paul CTO Staff Member


    Based on this:


    I'd say these domains were created as addon domains through account's cPanel control panel instead of being created as separate cPanel accounts through reseller's WHM. With addon domains document root will be within primary account's public_html.
  5. KH-Paul

    KH-Paul CTO Staff Member


    To have domains separate just create them as separate cPanel accounts through WHM >> Account Functions >> Create a New Account.

    Usage of any control panel puts some restrictions on what can be done and how. Out of 3 offered control panel cPanel is the most flexible one.
  6. Dewed

    Dewed New Member

    Ok, I initially tried creating one domain through WMH, getting an initial error giving me the impression I was trying to create a new non-name based domain, and a new ip would be needed, so I upgraded the one user I had to reseller, and have created an add-on domain through c-panel, and transferred it.

    This is the first domain, with several domains left to transfer, so I'll try WHM for the remainder, but how can I undo this and get the domain's files where I want them?
  7. KH-Paul

    KH-Paul CTO Staff Member


    There is no way to automatically convert your addon domain into the separate cPanel accout. The only way to do so is to kill the addon domain, create a new cPanel account, move the files, create/restore databases, create email accounts, etc.
  8. Dewed

    Dewed New Member

    ok... this isn't what I am asking, I don't need another cpanel account, unless you are saying that is the only way to have the 2nd domain's files outside of the first's domains document root..

    I was really hopping to just change the directory path in the httpd.conf file and have it stay there instead of being overwritten by cpanel
  9. KH-Paul

    KH-Paul CTO Staff Member


    I realize you might not want to change what was done already and that you might like to organize things in the way you've described but real life experience shows that it is always better to create separate cPanel accounts for separate domains. Having separate accounts won't only simplify such tasks as backups creation, etc but will also help to deal with situations where you will, say, want to migrate one of the domains to its own VPS/dedicate servers or will want to sell one of the domains, etc.

    If you still want to keep things in the way you've described you can try to edit the /usr/local/apache/conf/httpd.conf file and adjust DocumentRoot in the way you need it. After that run the "/usr/local/cpanel/bin/apache_conf_distiller --update" command. It isn't guaranteed that document root changes will be reianed but you can, at least, try to see what will happen.
  10. Robert

    Robert New Member

    Making all domains in ~/public_html/domainfolder

    I hope my question is found.. I will post a new topic if not.

    Along the lines of the OP's question.. my first domain lands in ~/public_html and then the addon domains land in ~/public_html/

    Aside from editing the httpd.conf, how do I make the first domain ALSO land in ~/public_html/ rather than just ~/public_html

    If you don't have my answer, perhaps you can help me phrase it correctly so I can find my answer on

    Thanks in advance
  11. Robert

    Robert New Member

    I think Paul answers my question actually.. I'll read more closely before I post.


Share This Page