Skip to content

Instantly share code, notes, and snippets.

@manjeshpv
Created November 10, 2015 16:41
Show Gist options
  • Save manjeshpv/5ccb4921e0d559378d7d to your computer and use it in GitHub Desktop.
Save manjeshpv/5ccb4921e0d559378d7d to your computer and use it in GitHub Desktop.
Awstats for easyengine - prerotate - /etc/logrotate.d/nginx
/var/log/nginx/*.log {
size 10M
missingok
rotate 52
compress
delaycompress
notifempty
create 0640 www-data adm
sharedscripts
prerotate
/var/bin/awstats/awstats_update
if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
run-parts /etc/logrotate.d/httpd-prerotate; \
fi \
endscript
postrotate
invoke-rc.d nginx rotate >/dev/null 2>&1
endscript
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment