Vincent M.
September 04, 2022 09:46AM
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@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@nginx.org
> To unsubscribe send an email to nginx-leave@nginx.org
>
>
>
> --
> I am not young enough to know everything. - Oscar Wilde (1854-1900)
>
> _______________________________________________
> nginx mailing list --nginx@nginx.org
> To unsubscribe send an email tonginx-leave@nginx.org

_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

Nginx stop logging

Vincent M. September 04, 2022 07:24AM

Re: Nginx stop logging

Frank Swasey September 04, 2022 08:20AM

Re: Nginx stop logging

Vincent M. September 04, 2022 09:46AM

Re: Nginx stop logging

Frank Swasey September 04, 2022 01:32PM

Re: Nginx stop logging

Sergey A. Osokin September 04, 2022 09:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 257
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready