New directory structure & changing DocumentRoot public_html to http

alex_reds

Registered
Jan 31, 2013
1
0
1
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/
e.g..
Code:
/home/our-user-name/public_html/website1
/home/our-user-name/public_html/website2
/home/our-user-name/public_html/website3
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 www.our-user-name.com. 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 www.our-user-name.com/website2

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:
Code:
/home/our-user-name/http/our-user-name/our-user-name.com/public_html/index.html  // 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
/home/our-user-name/http/clients-name1/website2/public_html/index.html
/home/our-user-name/http/clients-name2/website3/public_html/index.html
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

Alex
 

quietFinn

Well-Known Member
Feb 4, 2006
1,222
87
178
Finland
cPanel Access Level
Root Administrator
I don't really understand what you are trying to do, but this I know:

Each time I want to add addon domain, it automatically adds root folder public_html as DocumentRoot
cPanel only suggests that you use "public_html" as the root folder. You can remove it and use your accounts root folder (home/CPANELUSERNAME).