Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how do i rotate my apache logs
#11

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.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)