Search squid archive

Re: Squid keeps rotating.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> In my squid.conf I have edited the line logfile_rotate 0
> so this should prevent squid from changing access.log to access.log.1

That's true

> However for some reason it keeps doing that. Squid needs to write to
> /var/log/squid/access.log since that is a named pipe that has a text
> processor behind it. Any idea why Squid is still doing this ?

How's  /etc/logrotate.d/squid file. this is JUST one .


Example of /etc/logrotate.d/squid

/var/log/squid/access.log {
  daily
  rotate 4
  copytruncate
  compress
  notifempty
  missingok
}

/var/log/squid/cache.log {
  daily
  rotate 4
  copytruncate
  compress
  notifempty
  missingok
}

/var/log/squid/store.log {
  daily
  rotate 4
  copytruncate
  compress
  notifempty
  missingok

  # This script asks squid to rotate its logs on its own.
  # Restarting squid is a long process and it is not worth
  # doing it just to rotate logs
  postrotate
  /usr/sbin/squid -k rotate
  endscript
}

As you can see, I use the /usr/sbin/squid -k rotate command to let
squid rotate his logs. You can issue this command everytime you feel
the need to.


I got it from below URL

http://linux.cudeso.be/linuxdoc/squid.php



Happy Squiding
-- 
Thank you
Indunil Jayasooriya

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux