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.

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:
    14,460
    Likes Received:
    195
    Trophy Points:
    63
    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.
     
  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:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    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.
     
  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:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  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:
    14,460
    Likes Received:
    195
    Trophy Points:
    63
    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
     
Loading...

Share This Page