Best way to rotate Apache log files

Scott Gottreu picture Scott Gottreu · Sep 4, 2008 · Viewed 93.2k times · Source

I've got an Apache server that has one access log file that is topping 600MB. This makes it really hard to search the file or parse it.
What software or modules for Apache are available that will make a daily copy of my access file to make it more manageable?

Answer

serg10 picture serg10 · Sep 4, 2008

Have you looked at logrotate - this is probably the simplest, most widely available and well understood method of achieving this. It is highly configurable and will probably do 90% of what you need.