Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: Log rotation
07-12-2012, 04:09 PM #1
- Join Date
- Aug 2006
- Thanked 110 Times in 109 Posts
When i set up my server i thought i had set up log rotation on my apache logs. I went to use my apache logs because i needed some data from it and found that the log i wanted to rotate was 6GB. There are other logs in there that are being rotated but only for one of my domains.
i tried to set up all domains to write logs to
but this file /var/log/apache2/access_log is 6GB then the domain that rotates the logs has created other files with extra numbers at the end. such as
I want all domains to log to the same file without the numbers. Then i want to rotate that log
The virtual host that does the rotation on wrong file:
CustomLog '|/usr/sbin/rotatelogs "/var/log/apache2/access_log" 604800 0' "%h %v %l %u %t \"%r\" %>s %b"
CustomLog "/var/log/apache2/access_log" "%h %v %l %u %t \"%r\" %>s %b"
Also would the first rotation be a bad idea on the 6GB file as it zips it?You can not say you know how to do something, until you can teach it to someone else.