frosman

Registered
Jan 29, 2008
4
0
51
Dear friends,
I have several addon domains under the root of my cpanel account (myweb.com) in /home/public_html/

public_html/addon1
public_html/addon2
public_html/subdomain1
etc..

I have created a directory /public_html/dir/ where I want to install the website for myweb.com, so I have modified mod_rewrite in /home/public_html/.htaccess

It works properly but I would prefer to modify the document root in httpd.conf modifying the virtual host "myweb.com" (I have shell access). I am afraid of breaking my cpanel account.

Can i do it? Just writing "DocumentRoot /home/public_html/dir/". If cpanel doen't have any problem with it, Will I have to modify the DNS zones in my DNS?


Thanks in advance.

Best regards
Víctor M.
 

ChadE

Active Member
Mar 14, 2005
32
0
156
Dear friends,
I have several addon domains under the root of my cpanel account (myweb.com) in /home/public_html/

public_html/addon1
public_html/addon2
public_html/subdomain1
etc..

I have created a directory /public_html/dir/ where I want to install the website for myweb.com, so I have modified mod_rewrite in /home/public_html/.htaccess

It works properly but I would prefer to modify the document root in httpd.conf modifying the virtual host "myweb.com" (I have shell access). I am afraid of breaking my cpanel account.

Can i do it? Just writing "DocumentRoot /home/public_html/dir/". If cpanel doen't have any problem with it, Will I have to modify the DNS zones in my DNS?


Thanks in advance.

Best regards
Víctor M.
The DNS only tells the external client that your domain/subdomain exists, not where it is on the server. You CAN modify the httpd.conf manually, but what are you trying to do exactly?
Are you trying to change the folder name? I'm a little unclear as to your intent...

If you're trying to change the name of the document root (I.E, from public_html/docroot1 to public_html/docsite1), then I believe you only need to modify the document root value in httpd.conf (no additions - just modify). If not, can you clarify what you're trying to say/do?
 

frosman

Registered
Jan 29, 2008
4
0
51
Hi and thank you for your answer.

Now, the files of myweb.com must be located in /home/myaccount/public_html/.
I want to locate the files in /home/myaccount/public_html/directory/

I think the easiest way to do it is to change the httpd.conf file, so I would go to:

<VirtualHost x.y.z.u:80>
ServerName myweb.com
ServerAlias www.myweb.com
ServerAdmin [email protected]
DocumentRoot /home/myaccount/public_html

and I would change the DocumentRoot to:

DocumentRoot /home/myaccount/public_html/directory

Well, it must work, but I am afraid of breaking cPanel and I have a lot of addon domains under the root directory (/home/myaccount/public_html/addon1, addon2, etc..) that are working properly.

What's your opinion?