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.

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:
    1
    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,623
    Likes Received:
    21
    Trophy Points:
    38
    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.
     
Loading...

Share This Page