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!

DocumentRoot for default domain

Discussion in 'General Discussion' started by Krishopper, Feb 13, 2011.

  1. Krishopper

    Krishopper Registered

    Joined:
    Feb 13, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    51
    Hello,

    Is it possible to adjust cPanel so that the main domain name goes into public_html/domain.com, and the DocumentRoot for that adjusts accordingly as well?

    I do not want my users to be able to go to http://maindomain.com/alternatedomain.com to get to their alternate domains, I'd like each domain (including the main) to be in a separate directory.

    Thanks
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,608
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello Krishopper,

    Rather than having the main domain in public_html/maindomain.com you could instead have addon domains go to their own directory outside public_html by unchecking this option in WHM > Tweak Settings:

    When users aren't prevented from creating subdomains outside of public_html, they can then create addon domains such as /home/username/addon1.com, /home/username/addon2.com while the main domain would still be at /home/username/public_html location.

    Of note, you cannot enforce this option for accounts with the setting, but you can allow the option, so users can do this if they want to do so.

    Thanks.
     
    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