Rotating nginx logs in solaris
April 19, 2009
Our logs at fabulously40 grow quite large each day. I needed away to rotate our nginx logs so it does not grow uncontrollably.
Here is the recipe
sh# logadm -w /opt/extra/nginx/logs/fab40.access.log -s 100m -a 'kill -USR1 `cat /opt/extra/nginx/logs/nginx.pid`' # check /etc/logadm.conf sh# cat /etc/logadm.conf # if you wish to test it out right away, run logadm sh# /usr/sbin/logadm