Skip to content

Fix nginx postrotate#32

Open
BryceStevenWilley wants to merge 1 commit into
v1.9.8.postfrom
fix_nginx_logrotate
Open

Fix nginx postrotate#32
BryceStevenWilley wants to merge 1 commit into
v1.9.8.postfrom
fix_nginx_logrotate

Conversation

@BryceStevenWilley
Copy link
Copy Markdown

@BryceStevenWilley BryceStevenWilley commented May 21, 2026

The postrotate action of nginx's lograte wasn't being run, because there isn't a /etc/init.d/nginx anymore (confirmed it's because we've updated nginx in e9e926c, so this shouldn't be pushed upstream). Logrotate would still rename the logs, but nginx would continue writing to the renamed file, thus continuing to use access.log.1.

Changing it to nginx-debug fixes the issue.

Idea from https://serverfault.com/questions/823725/logrotate-not-writing-logs-to-correct-file

The postrotate action of nginx's lograte wasn't being run, because there isn't
a `/etc/init.d/nginx` anymore (unclear if it's because we've updated nginx).
Logrotate would still rename the logs, but nginx would continue writing to
the renamed file, thus continuing to use access.log.1.

Changing it to `nginx-debug` fixes the issue.

Idea from https://serverfault.com/questions/823725/logrotate-not-writing-logs-to-correct-file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants