Reorganize the public_html directory
Hi,I would like to know if there's any easy way to reorganize the public_html directory with cPanel.
The thing is that the way cPanel works by default, there are a few problems in certain situations.
I'll give you an example: I want to host more than one website on a single shared account. It will be something like this:
/public_html/
|
|--- /maindomain/
|--- /maindomain/www/
|--- /maindomain/asubdomain/
|
|--- /addon/
|--- /addon/www/
|--- /addon/asubdomain/
In this directory structure you see two things that don't occur with "default" cPanel: the www subdomain isn't at the root of public_html and the sub-domains of add-on domains aren't also at the root of public_html.
Why do I want to do this? To solve 3 particular problems:
problem 1
sub-domains are accessible from the main address
take this example:
public_html/ -> the www.domain.com
public_html/subdomain/ -> a sub domain
if I go to www.domain.com/subdomain I can access the domain.subdomain.com content through the main (www) address.
I really don't want that, I want my sub-domain do be accessible only by its address. The way to solve this would be not to consider the www to be located at the root of the public_html but at an own directory.
problem 2
addon domains accessible from the main domain
public_html/ -> www.domain.com
public_html/addondomain/ -> www.addondomain.com
if for instance someone tries to access www.domain.com/addondomain he/she will access the addon from the main domain. The problem is solved by using a public_html sub-directory for each hosted domain.
problem 3
different domains, same sub-domain names
subdomain.domain.com
subdomain.addondomain.com
as cPanel creates every sub-domain as a directory under public_html, it means that for the situation on this example the structure would be:
/public_html/
|
|--- /maindomain/
|
|--- /addondomain/
|--- /subdomain/ <- common directory to both domains
meaning that I will not be able to setup the same subdomain name on different hosted domains.
So, considering that there are thousands of forum members that deal with cPanel everyday, is there a way to do this with a shared hosting account? I do realise that a reseller account would partially solve these issues (well, it would solve only problem 3), but I need to know if there's any chance to do what I want without asking the host company to change the DocumentRoot of each virtual server on the httpd.conf file.
Best regards.