<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">You should verify that /run/nginx.pid actually exists and contains the PID of the master nginx process on your Rocky Linux system.</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">I think that adding the "create 0640 nginx root" line to the logrotate config file would not help. You can issue the "kill -USR1 <PID>" where you replace "<PID>" with the PID of the running nginx process and it SHOULD create a new log file.</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">~ Frank<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Sep 4, 2022 at 9:46 AM Vincent M. <<a href="mailto:mouseless@free.fr">mouseless@free.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<div>
<div>On my Rocky Linux 9, I have found
this file /etc/logrotate.d/nginx <br>
</div>
<div>/var/log/nginx/*log {<br>
daily<br>
rotate 10<br>
missingok<br>
notifempty<br>
compress<br>
delaycompress<br>
sharedscripts<br>
postrotate<br>
/bin/kill -USR1 `cat /run/nginx.pid 2>/dev/null`
2>/dev/null || true<br>
endscript<br>
}<br>
</div>
<div><br>
</div>
<div>Whereas I have on my Fedora 36 (with
a working fine log rotation process):</div>
<div>/var/log/nginx/*.log {<br>
create 0640 nginx root<br>
daily<br>
rotate 10<br>
missingok<br>
notifempty<br>
compress<br>
delaycompress<br>
sharedscripts<br>
postrotate<br>
/bin/kill -USR1 `cat /run/nginx.pid 2>/dev/null`
2>/dev/null || true<br>
endscript<br>
}<br>
<br>
</div>
<p>Can I had on (create 0640 nginx root) on the server whitout
risking to break everything on next logs rotates?<br>
</p>
Thank you,<br>
Vincent.</div>
<div><br>
</div>
<div>On 9/4/22 14:17, Frank Swasey wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:georgia,serif">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.</div>
<div class="gmail_default" style="font-family:georgia,serif"><br>
</div>
<div class="gmail_default" style="font-family:georgia,serif"> ~
Frank<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sun, Sep 4, 2022 at 7:24 AM
Vincent M. <<a href="mailto:mouseless@free.fr" target="_blank">mouseless@free.fr</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p><font face="Arial">Hello,</font></p>
<p><font face="Arial">The logs are working fine but once a
day, nginx stop loging access and then the file log file
is empty.<br>
</font></p>
<p><font face="Arial">So every day I have to restart my
nginx server in order to get the logs.</font></p>
<p><font face="Arial">It's on a Rocky Linux 9 with Nginx
1.20.1</font></p>
<p><font face="Arial">Never seen that before, what should I
check?<br>
</font></p>
<p>Thanks,<br>
Vincent.<br>
</p>
</div>
_______________________________________________<br>
nginx mailing list -- <a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
To unsubscribe send an email to <a href="mailto:nginx-leave@nginx.org" target="_blank">nginx-leave@nginx.org</a><br>
</blockquote>
</div>
<br clear="all">
<br>
-- <br>
<div dir="ltr">I am not young enough to
know everything. - Oscar Wilde (1854-1900)</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
nginx mailing list -- <a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a>
To unsubscribe send an email to <a href="mailto:nginx-leave@nginx.org" target="_blank">nginx-leave@nginx.org</a>
</pre>
</blockquote>
<p><br>
</p>
</div>
_______________________________________________<br>
nginx mailing list -- <a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
To unsubscribe send an email to <a href="mailto:nginx-leave@nginx.org" target="_blank">nginx-leave@nginx.org</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">I am not young enough to know everything. - Oscar Wilde (1854-1900)</div>