Preferred method to reopen the log with logrotate

Roger Fischer roger at netskrt.io
Wed Jun 1 15:07:13 UTC 2022


Hello,

there seem to be two methods to tell nginx to re-open the log file after the file was rotated (we use logrotate).

1) nginx -s reopen

2) kill -USR1

Which is the preferred method, and why.

I am asking because we have seen nginx -s reopen failing because of a transient issue with the configuration. According to the man page reopen should be the same as SIGUSR1, but the error we saw implies that the config was reloaded (ie SIGHUP).

Version: nginx/1.19.9

Thanks…

Roger

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20220601/6ff1510e/attachment.htm>


More information about the nginx mailing list