Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

how to move logs out of /usr ?

Discussion in 'General Discussion' started by Radio_Head, Oct 21, 2003.

  1. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    343
    Hello

    I need/wish to move logs

    [/usr/local/apache/domlogs]
    and
    [/usr/local/apache/logs]

    out of /usr for example on /home/apachelogs/

    any way to do that ?

    THANK YOU
    (long time ago I read something on this forum but now I cannot find the post)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    343
    I was thinking to do this


    ======================
    mkdir /home/apache/logs/
    chmod 755 /home/apache/logs

    mkdir /home/apache/domlogs
    chmod 755 /home/apache/domlogs


    mv /usr/local/apache/logs/* /home/apache/logs
    mv /usr/local/apache/domlogs/* /home/apache/domlogs


    rmdir /usr/local/apache/logs
    rmdir /usr/local/apache/domlogs

    /etc/rc.d/init.d/chkservd stop;/etc/rc.d/init.d/httpd stop

    ln -s /home/apache/logs /usr/local/apache/logs
    ln -s /home/apache/domlogs /usr/local/apache/domlogs

    /etc/rc.d/init.d/chkservd start;/etc/rc.d/init.d/httpd start

    ======================


    What do you think , it will work fine ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #2 Radio_Head, Oct 21, 2003
    Last edited: Oct 21, 2003
  3. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    343
    Hello

    I executed the procedure above , ok worked fine
    :p

    If apache doesn't update logs try
    to stop and restart again apache.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    4
    Trophy Points:
    343
    Location:
    ON, Canada
    Could've shortened it too.

    ======================
    mkdir /home/apache/

    mv /usr/local/apache/logs /home/apache
    mv /usr/local/apache/domlogs /home/apache

    /etc/rc.d/init.d/chkservd stop;/etc/rc.d/init.d/httpd stop

    ln -s /home/apache/logs /usr/local/apache/logs
    ln -s /home/apache/domlogs /usr/local/apache/domlogs

    /etc/rc.d/init.d/chkservd start;/etc/rc.d/init.d/httpd start

    ======================

    That would do the same thing. With mkdir, permissions are already 755, and when moving an entire directory, it's not necessary to create it's new location first. :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice