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.

Cleaning Apache log files (newsbie question)

Discussion in 'EasyApache' started by Radio_Head, Mar 24, 2002.

  1. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    38
    What I have to do to clean apache log files on all accounts ?
     
  2. feanor

    feanor Well-Known Member

    Joined:
    Aug 13, 2001
    Messages:
    836
    Likes Received:
    0
    Trophy Points:
    16
    For all at once? By clean you mean....... trim?
    I would trim all of them down to something between 5 and 10 thousand lines all in one shot, with a shell script that simply opens each, copies output to /tmp or something, and then back to /usr/local/apache/domlogs...........

    Is this the type of thing you mean? If so I could help further with specifics....

    You'd be restarting apache afterwards of course.
     
  3. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    38
    I intend delete .

    How to Delete all apache log files , for each account , every month , to free web space .


    Thanks
     
  4. feanor

    feanor Well-Known Member

    Joined:
    Aug 13, 2001
    Messages:
    836
    Likes Received:
    0
    Trophy Points:
    16
    Remove everything in /usr/local/apache/domlogs

    And then
    killall -9 httpd
    /etc/rc.d/init.d/httpd startssl &


    This will remove ALL the domlogs for any domain hosted on that server..... statistical data will be lost at the next time a customer runs their webalizer or analog stats. (They'll be overwritten by the output of crunching the new, cleansed logs)

    just FYI
     
Loading...

Share This Page