Welcome! Log In Create A New Profile

Advanced

Re: Rotating access.log and error.log

All files from this thread

File Name File Size   Posted by Date  
5.7 KB open | download danny 12/11/2009 Read message
emil | uruz.org
December 12, 2009 06:38PM
Danny Trinh wrote:
>
> Hello group,
>
> I like nginx. I have a dumb question: Is there a way that I can setup
> to rotate the nginx logfiles? My access.log is growing over 700MB.
>
> Thanks,
>
>
>
> _Danny Trinh_
>
> Linux Admin
>
> cid:image001.png@01C9C726.FEA6D1C0
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
You can do it with logrotate like in this example /etc/logrotate.d/nginx

/var/logs/nginx/*.log {
missingok
notifempty
sharedscripts
postrotate
test ! -f /var/run/nginx.pid || kill -USR1 `cat /var/run/nginx.pid`
endscript

}

And you might want to have a look at http://wiki.nginx.org/NginxLogRotation

Best,
Emil

--
http://uruz.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Rotating access.log and error.log Attachments

danny December 11, 2009 12:08PM

Re: Rotating access.log and error.log

Jim Ohlstein December 11, 2009 12:16PM

Re: Rotating access.log and error.log

emil | uruz.org December 12, 2009 06:38PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 190
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready