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!

How can I change the default subdomain directory?

Discussion in 'General Discussion' started by MWorksMT, Oct 1, 2015.

  1. MWorksMT

    MWorksMT Registered

    Joined:
    Oct 1, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bozeman, MT
    cPanel Access Level:
    Root Administrator
    Hi there,

    We've occasionally had some of our hosted clients run into undesirable effects (cascading .htaccess rules, php.ini configurations, etc.) because their subdomains get created within their /public_html directory.

    I'm wanting to change the default to a directory below /public_html to avoid the aforementioned issues.

    In other words, when someone goes to create a subdomain within cPanel, the default directory will be something like /subdomains - So instead of the subdomain's root going into /public_html/whatever, it'd go into /subdomains/whatever.

    I do have the "Subdomains outside public_html" option enabled in WHM, and realize that one can manually just enter a different directory when creating a subdomain, but it would be nice if I could set the default.

    Is there a configuration file somewhere on the server which I can edit to change this? :)
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    There are no native features that will allow you to change the default populated document root when creating a new subdomain, or to restrict the use of public_html in the document root. This is a good idea for a feature request:

    Submit A Feature Request

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. MWorksMT

    MWorksMT Registered

    Joined:
    Oct 1, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bozeman, MT
    cPanel Access Level:
    Root Administrator
    Hi Michael,

    Thanks for your response to my post.

    I clicked the link you provided, which suggests that I am automatically logged into the Feature Request site, but upon trying to submit a request I am prompted to login. The system is then unable to find my account.

    Are you able to send me an invite code so that I might submit the feature request?

    Thank you, Michael!
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,791
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    You should be able to leave the invite code field blank and create a new account for the feature request system.

    Thank you.
     
    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