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 Home Directory

Discussion in 'General Discussion' started by lefteris, May 9, 2006.

  1. lefteris

    lefteris Member

    Joined:
    Nov 5, 2005
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Hi all.
    I have a Server with Cpanel and 2 hard disk 2x80gb

    I have one hosting domain at the first h/d and 3 domains to the second disk.
    how can i move the 3 hostings from /home2/ to /home/ ?

    Move from second h/d to first h/d

    first h/d is /home/
    second is /hom2/
     
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    If you wish to move your domains from 2nd HDD to 1st. CD to /home2 dir and copy all the 3 accounts to /home. You will also have to make the necessary changes in VirtualHost entry in httpd.conf file.
    Follow the commands :-
    cd /home2
    cp forldername /home -R
    You will also have to set the correct permissions and ownership for those account once it is moved to /home.

    Edit the httpd.conf file at /usr/local/apache/conf/
    Search the VirtualHost entry for those domains and change the DocumentRoot :-
    From
    /home2/username/public_html/
    To
    /home/username/public_html/
     
  3. avijit

    avijit Well-Known Member

    Joined:
    Jul 26, 2004
    Messages:
    116
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cp -p foldername /home -R will keep the permissions, ownership as the same as the souces.
     
  4. lefteris

    lefteris Member

    Joined:
    Nov 5, 2005
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    thank's

    i do it and now everything it's ok!

    many thank's
     
  5. lefteris

    lefteris Member

    Joined:
    Nov 5, 2005
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    i check my cpanel and i see the partition of the files (domains) it's still /home2/
    how can i change it?
     
Loading...

Share This Page