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.

change sites default directory

Discussion in 'General Discussion' started by Web_Rob, Jan 9, 2009.

  1. Web_Rob

    Web_Rob Member

    Joined:
    Nov 30, 2006
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Hi all!

    I am wondering how to better keep my files and folders organized in my domain folders.

    Right now my default domain for my personal account is in the folder /public_html/. Then all of my addon domains are in that same folder.

    I would like to have it so all of my domains are in their own folders in /public_html/

    Is there a way for me to tell cpanel where I am moving my default domains files?
     
  2. Kailash1

    Kailash1 Well-Known Member

    Joined:
    Nov 27, 2006
    Messages:
    252
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    To change the physical path of the domain, you will need to modify DocumentRoot path in httpd.conf file for your domains and you will need the root access to make this changes. If you have not done any modification in httpd.conf or you have no experience in this then I would suggest not to touch your httpd.conf file.

    Kailash
     
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Not sure I understand the question.
    Right now your main site is in public_html/
    Your addon domains are in public_html/domain1, public_html/domain2, public_html/domain3.

    You want your main site in a directory like public_html/domain so that basically, the public_html is just directories of sites?

    If yes, move all your main site's files to the new directory and you could set a redirect from the tool in your cPanel to point from yourdomain.com --> yourdomain.com/domain/

    The addons domains should already be doing that by default if you go to domain1.com, domain2.com domain3.com
     
  4. Web_Rob

    Web_Rob Member

    Joined:
    Nov 30, 2006
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Thank you for the replies. I am familiar with modifying the httpd.conf, but when I open the file it is telling me to edit the includes.

    I would like to stay away form the domain forwarding and just change the root folder for apache.

    I would like to set it up so the public_html folder is a list of directories.
     
Loading...

Share This Page