access logs hang

Lorenzo Raffio multiformeingegno at gmail.com
Thu Oct 9 07:57:22 UTC 2014


Thanks for the reply. I compiled nginx from source, 1.7.5. I'm on Ubuntu 14.04. I know there's a log rotation function built-in but I prefer to work things out by myself. :DSo I created this script to automatically rotate my logs:find /var/www/ -ipath */logs/access.log.gz -execdir mv "{}" "old/`date +\%G-\%m-\%d`-access.log.gz" \;
wait
/opt/nginx/sbin/nginx -s reopen



Maybe the problem is that logs get reopen before files are moved? But "wait" should deal with that..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20141009/9a1ecbd0/attachment.html>


More information about the nginx mailing list