Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Changing Directories

Discussion in 'General Discussion' started by wstar, Dec 23, 2014.

  1. wstar

    wstar Member

    Joined:
    Oct 7, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    I see a few different posts, but I don't see this same question on here.
    I have a site home directory as home/USERNAME. We also have a development site for testing. When I make a subdomain, it puts it in home/USERNAME/development folder. We would like to separate these like so

    Main Site: home/USERNAME/site
    Development Site: home/USERNAME/dev

    I have full access to the server, even through WHM. I'm guessing I would have to change the httpd.conf file? And would there be one httpd.conf for both?

    Thanks for any help in this issue.
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,242
    Likes Received:
    385
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    When adding a subdomain, you are able to modify the default path for it right from within your cPanel.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. wstar

    wstar Member

    Joined:
    Oct 7, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    When creating the subdomain, the directory is set to the home directory then a subfolder.
    Ex. home/USERNAME/subdomain
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,916
    Likes Received:
    1,815
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    You can choose the document root of your preference when creating the subdomain. For instance, it can be in the account's home directory or within the public_html directory. Is it not working as intended when you do this?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. wstar

    wstar Member

    Joined:
    Oct 7, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    Thanks for the quick replies.
    When I create a subdomain I can attach and folder(s) to the end of the home directly. But I wanted to see if there was a way to make it different than the home directory.

    My end goal is to have this
    Main Site: home/USERNAME/site
    Development Site: home/USERNAME/dev

    I just don't want the development site to be home/USERNAME/site/dev
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,916
    Likes Received:
    1,815
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Could you attach a screenshot of what you see when attempting to modify the directory during the subdomain creation?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. wstar

    wstar Member

    Joined:
    Oct 7, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    Yeah I can when I get home. I think my first step is to change the home directory for the site?
    To home/USERNAME/site instead of the default home/USERNAME/ ?
     
  8. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,242
    Likes Received:
    385
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    So, on the Create a Subdomain page, you'd do this:

    Subdomain: dev
    Domain: domain.com
    Document root: /dev
    You'll need to edit the auto filled details here.

    The docs should be of some use:

    Subdomains - cPanel Documentation
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice