<div dir="ltr">Hi<br><br>I&#39;ve built nginx from source on ubuntu in /usr/local/nginx according to the tutorial: <br><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>and used the init.d script:<br><a href="http://articles.slicehost.com/2009/3/4/ubuntu-intrepid-adding-an-nginx-init-script">http://articles.slicehost.com/2009/3/4/ubuntu-intrepid-adding-an-nginx-init-script</a><br><br>
read this about nginx log rotation:<br><a href="http://www.ruby-forum.com/topic/134115">http://www.ruby-forum.com/topic/134115</a><br><br>when forcing logrotate with: sudo logrotate -f /etc/logrotate.conf<br>nginx starts using access.log.1<br>
but when using a signal manually nginx uses access.log: sudo kill -USR1 `cat nginx.pid`<br><br>If I&#39;m using &#39;nginx&#39; user in the logrotate script I&#39;m getting an error that this use doesn&#39;t exists so I have to use root.<br>
My logrotate script under /etc/logrotate.d/nginx<br>/usr/local/nginx/logs/*.log {<br>        weekly<br>        missingok<br>        rotate 52<br>        compress<br>        delaycompress<br>        notifempty<br>        create 640 nginx adm<br>
        sharedscripts<br>        postrotate<br>                [ ! -f /usr/local/nginx/logs/nginx.pid ] || kill -USR1 `cat /usr/local/nginx/logs/nginx.pid`<br>        endscript<br>}<br><br>What am I doing wrong?<br>Thanks<br>
<br><br></div>