nginx not rotating logs
Bug #1328821 reported by
Samuele Giovanni Tonon
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Nginx |
Fix Released
|
Undecided
|
Unassigned | ||
nginx (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Trusty |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
in nginx-common package there's the script to rotate nginx logs but it does not work as intended:
it does rename the log but nginx keeps writing on that one.
this is because -USR1 signal doesn't seem to work, you have to use -HUP and then nginx will close and reopen logs files (without resetting uptime which is nice for detecting if webserver is stable or not) .
so i had to change my /etc/logrotate.
postrotate
[ -s /run/nginx.pid ] && kill -USR1 `cat /run/nginx.pid`
endscript
to
postrotate
/etc/
endscript
to make it properly rotate log files.
tags: | added: trusty |
no longer affects: | ubuntu |
Changed in nginx: | |
status: | Incomplete → Fix Released |
Changed in nginx (Ubuntu): | |
status: | New → Fix Released |
Changed in nginx (Ubuntu Trusty): | |
status: | New → Confirmed |
To post a comment you must log in.
Which version of the package were you seeing this on? Are you using the version in Ubuntu, or in the PPAs?