Nginx stop logging

Vincent M. mouseless at free.fr
Sun Sep 4 13:45:10 UTC 2022


On my Rocky Linux 9, I have found this file /etc/logrotate.d/nginx
/var/log/nginx/*log {
     daily
     rotate 10
     missingok
     notifempty
     compress
     delaycompress
     sharedscripts
     postrotate
         /bin/kill -USR1 `cat /run/nginx.pid 2>/dev/null` 2>/dev/null || 
true
     endscript
}

Whereas I have on my Fedora 36 (with a working fine log rotation process):
/var/log/nginx/*.log {
     create 0640 nginx root
     daily
     rotate 10
     missingok
     notifempty
     compress
     delaycompress
     sharedscripts
     postrotate
         /bin/kill -USR1 `cat /run/nginx.pid 2>/dev/null` 2>/dev/null || 
true
     endscript
}

Can I had on (create 0640 nginx root) on the server whitout risking to 
break everything on next logs rotates?

Thank you,
Vincent.

On 9/4/22 14:17, Frank Swasey wrote:
> This sounds like your log rotation process is not signalling nginx to 
> write a new log.  I don't know Rocky Linux, so I can't be specific in 
> further suggestions.
>
>  ~ Frank
>
> On Sun, Sep 4, 2022 at 7:24 AM Vincent M. <mouseless at free.fr> wrote:
>
>     Hello,
>
>     The logs are working fine but once a day, nginx stop loging access
>     and then the file log file is empty.
>
>     So every day I have to restart my nginx server in order to get the
>     logs.
>
>     It's on a Rocky Linux 9 with Nginx 1.20.1
>
>     Never seen that before, what should I check?
>
>     Thanks,
>     Vincent.
>
>     _______________________________________________
>     nginx mailing list -- nginx at nginx.org
>     To unsubscribe send an email to nginx-leave at nginx.org
>
>
>
> -- 
> I am not young enough to know everything. - Oscar Wilde (1854-1900)
>
> _______________________________________________
> nginx mailing list --nginx at nginx.org
> To unsubscribe send an email tonginx-leave at nginx.org

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


More information about the nginx mailing list