logrotate nginx log by date

Logrotate by default rotate logs with numbers like following

logrotate nginx access log

You can configure how many logs to keep and how to rotate lots by editing logrotate configuration file for nginx

rotate 14 – this tells logrotate to keep logs for 14 days.

If you need to rotate logs by date, add


See Logrotate

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *