1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

How to rotate /var/log/httpd/access_log ?

Discussion in 'Plesk for Linux - 8.x and Older' started by AlterEgo, Jul 5, 2005.

  1. AlterEgo

    AlterEgo Guest

    0
     
    Can someone explain me how i can rotate the access_log in /var/log/httpd/access_log ? It's realy huge (about 5 gig a day) and i realy don't need it !

    Thanks!
     
  2. serve-you.net

    serve-you.net Guest

    0
     
    create /etc/logrotate.d/httpd with the following. If will likely fail on that 5 gig log though. If you dont need it, I would stop apache, delete it, and restart apache.
     
  3. AlterEgo

    AlterEgo Guest

    0
     
    Thanks, wil first try a new httpd... i think your 2nd solution will not work because it will recreate access_log automatic.
     
  4. serve-you.net

    serve-you.net Guest

    0
     
    That's what it is supposed to do. Apache will not run without the access_log. It is defined in your httpd.conf.
     
  5. mikk

    mikk Basic Pleskian

    23
    73%
    Joined:
    Jan 29, 2005
    Messages:
    83
    Likes Received:
    0
    You can always empty it with an hourly cron with somehting like

    0 * * * * /bin/echo "" > /path/to/access_log

    (may need to use \"\" cant remember)


    seems strange for that log to be getting so large daily if its already set on rotation
     
  6. jamesyeeoc

    jamesyeeoc Guest

    0
     
    Wow, if his site is that busy, I wanna visit it too!!! lol
     
  7. serve-you.net

    serve-you.net Guest

    0
     
    seriously.
     
  8. AlterEgo

    AlterEgo Guest

    0
     
    Thanks that's also a good solution!
     
  9. AlterEgo

    AlterEgo Guest

    0
     
    Please send me a private message if you want to visit this site ! ;)
     
Loading...