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!

New directory structure & changing DocumentRoot public_html to http

Discussion in 'General Discussion' started by alex_reds, Jan 31, 2013.

  1. alex_reds

    alex_reds Registered

    Jan 31, 2013
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Website Owner
    Hey guys,

    Well, frankly speaking I don't know what exactly do I need, cuz not sure I understand the whole process how cPanel and Apache work together.
    However I will try explain on my examples and I hope you will able to point me in a right direction

    We have an account on some VPS with bunch of websites.
    We have no root access but can log in by ssh. So it's kind of shared hosting account with fancy ssh feature under one none-root user.

    So, all our websites(created by addon domain) are in /home/our-user-name/public_html/
    In this public_html directory we have some logs, ftpquota, error_log etc

    Each time I want to add addon domain, it automatically adds root folder public_html as DocumentRoot

    We have our own domain sat up as main/primary domain and the public_html its DocumentRoot directory. Before me there has been installed WordPress, so you can imagine what a mess in there. And addition to that all subdirectories are available publicly e.g

    I want to change this structure, and make it more clean and isolated for each client and have more room for resource files for various php websites
    So here is the structure I'd like:
    /home/our-user-name/http/our-user-name/  // for our primary domain
    /home/our-user-name/http/clients-name1/website1/public_html/index.html                   // For the rest websites
    /home/our-user-name/http/clients-name1/website1/configuratioon.php                         // Dirs and file out of public access
    So the question I presume is - How to make the http directory something like ServerRoot?
    And primary domain to be located in own isolated subdirectory?

    Thank you in advance

  2. quietFinn

    quietFinn Well-Known Member

    Feb 4, 2006
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    I don't really understand what you are trying to do, but this I know:

    cPanel only suggests that you use "public_html" as the root folder. You can remove it and use your accounts root folder (home/CPANELUSERNAME).
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

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