Linux-Noob Forums

Full Version: how do i rotate my apache logs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2

Quote:# LogFile defines the web server log file to use. If not specified# here or on on the command line, input will default to STDIN. If

# the log filename ends in '.gz' (ie: a gzip compressed file), it will

# be decompressed on the fly as it is being read.

LogFile /usr/local/apache/logs/access_log
 

Well attempting to specify it in the file will plainly fail, however it gives us a clue of a way around it:

 



Code:
cat /usr/local/apache/logs/access_log* | webalizer




 

Using stdin we can simply pipe the information into webalizer. Of course if the logs get compressed then we would have a slightly different command.

 

Anyway that should capture all the logs and rotated logs, I guess that order is unimportant as the log file actually has that information on every line.

Pages: 1 2