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.

Modify manually httpd.conf

Discussion in 'General Discussion' started by frosman, Jan 31, 2008.

  1. frosman

    frosman Registered

    Joined:
    Jan 29, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
  2. ChadE

    ChadE Active Member

    Joined:
    Mar 14, 2005
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    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?
     
  3. frosman

    frosman Registered

    Joined:
    Jan 29, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    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 webmaster@myweb.com
    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?
     
Loading...

Share This Page