<div dir="ltr"><br><br><div class="gmail_quote">2010/3/7 Борис Долгов <span dir="ltr">&lt;<a href="mailto:boris@dolgov.name">boris@dolgov.name</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Are you sure, that  /usr/local/nginx/logs/nginx.pid has actual pid of<br>
the master process?<br></blockquote><div><br>Yes according to the tutorial at <a href="http://articles.slicehost.com/2009/3/4/ubuntu-intrepid-installing-nginx-from-source">http://articles.slicehost.com/2009/3/4/ubuntu-intrepid-installing-nginx-from-source</a><br>
<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
2010/3/7 pablo platt &lt;<a href="mailto:pablo.platt@gmail.com">pablo.platt@gmail.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; Hi<br>
&gt;<br>
&gt; I&#39;ve built nginx from source on ubuntu in /usr/local/nginx according to the<br>
&gt; tutorial:<br>
&gt; <a href="http://articles.slicehost.com/2009/3/4/ubuntu-intrepid-installing-nginx-from-source" target="_blank">http://articles.slicehost.com/2009/3/4/ubuntu-intrepid-installing-nginx-from-source</a><br>
&gt;<br>
&gt; and used the init.d script:<br>
&gt; <a href="http://articles.slicehost.com/2009/3/4/ubuntu-intrepid-adding-an-nginx-init-script" target="_blank">http://articles.slicehost.com/2009/3/4/ubuntu-intrepid-adding-an-nginx-init-script</a><br>
&gt;<br>
&gt; read this about nginx log rotation:<br>
&gt; <a href="http://www.ruby-forum.com/topic/134115" target="_blank">http://www.ruby-forum.com/topic/134115</a><br>
&gt;<br>
&gt; when forcing logrotate with: sudo logrotate -f /etc/logrotate.conf<br>
&gt; nginx starts using access.log.1<br>
&gt; but when using a signal manually nginx uses access.log: sudo kill -USR1 `cat<br>
&gt; nginx.pid`<br>
&gt;<br>
&gt; If I&#39;m using &#39;nginx&#39; user in the logrotate script I&#39;m getting an error that<br>
&gt; this use doesn&#39;t exists so I have to use root.<br>
&gt; My logrotate script under /etc/logrotate.d/nginx<br>
&gt; /usr/local/nginx/logs/*.log {<br>
&gt;         weekly<br>
&gt;         missingok<br>
&gt;         rotate 52<br>
&gt;         compress<br>
&gt;         delaycompress<br>
&gt;         notifempty<br>
&gt;         create 640 nginx adm<br>
&gt;         sharedscripts<br>
&gt;         postrotate<br>
&gt;                 [ ! -f /usr/local/nginx/logs/nginx.pid ] || kill -USR1 `cat<br>
&gt; /usr/local/nginx/logs/nginx.pid`<br>
&gt;         endscript<br>
&gt; }<br>
&gt;<br>
&gt; What am I doing wrong?<br>
&gt; Thanks<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div><div><div></div><div class="h5">&gt; _______________________________________________<br>
&gt; nginx mailing list<br>
&gt; <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
&gt; <a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
&gt;<br>
&gt;<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br></div>