Hallo.
Vor dem Einsatz von ispconfig hatte ich folgende Lösung:
(Auflistung aller Downloads eines bestimmten Dateityps in separatem Logfile)
/etc/logrotate.d/apache2
Da nun ispconfig die access.log separat pro Site führt die Frage, wo am besten die Zeile einbauen ?:
Natürlich sollte dies vor der Rotation geschehen um keine doppelten Einträge zu erhalten.
Danke für Tips.
Vor dem Einsatz von ispconfig hatte ich folgende Lösung:
(Auflistung aller Downloads eines bestimmten Dateityps in separatem Logfile)
/etc/logrotate.d/apache2
Code:
/var/log/apache2/*.log {
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
prerotate
cat /var/log/apache2/access.log | grep 200 | grep tgz >> /var/www/dtgzlog
endscript
postrotate
if [ -f "`. /etc/apache2/envvars ; echo ${APACHE_PID_FILE:-/var/run/apache2.pid}`" ]; then
/etc/init.d/apache2 reload > /dev/null
fi
endscript
}
Code:
cat /var/log/apache2/access.log | grep 200 | grep tgz >> /var/www/dtgzlog
Danke für Tips.