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.

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:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    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.
     
  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:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page