Summary: | www-servers/nginx - Missing logrotate script | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | macindy <gp> |
Component: | [OLD] Server | Assignee: | Konstantin Arkhipov (RETIRED) <voxus> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | djc, gef.kornflakes |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
macindy
2009-12-08 08:53:03 UTC
nginx as built-in support for instant log-rotation using USR1 signal: /var/log/nginx/*_log { missingok sharedscripts postrotate kill -USR1 `cat /var/run/nginx.pid` endscript } (In reply to comment #1) > nginx as built-in support for instant log-rotation using USR1 signal: > > /var/log/nginx/*_log { > missingok > sharedscripts > postrotate > kill -USR1 `cat /var/run/nginx.pid` > endscript > } > I would prefer using /etc/init.d/nginx reload instead of kill for this task. the init script's reload() should also switch from HUP to USR1 - but that's another issue. About Nginx handling of signals, docs [1] says the following : HUP: `- Configuration reload `-Start the new worker processes with a new configuration `-Gracefully shutdown the old worker processes USR1 `-Reopen the log files USR2 `-Upgrade Executable on the fly So using USR1 to reopen logs after rotation seems sane. [1] http://wiki.nginx.org/NginxCommandLine#Controlling_Nginx_Via_the_Signals I've added a logrotate script to 0.7.64-r3 (and will port it to 0.8.x soon). |