Logrotate
Posted: 2007-02-03 11:22
Heyho,
habe eine ziemlich hoch frequentierte Seite und wollte nun Logrotate einsetzten, damit die Logs nicht mehrere GB groß werden ...
Habe nun folgende Datei bearbeitet:
/etc/logrotate.d/apache2
und folgenden Inhalt hinzugefügt:
aber wenn ich mache
:
also scheints nicht zu funktionieren ... (die Regel hab ich bereits vor ein paar Tagen angelegt)
Woran liegts?
habe eine ziemlich hoch frequentierte Seite und wollte nun Logrotate einsetzten, damit die Logs nicht mehrere GB groß werden ...
Habe nun folgende Datei bearbeitet:
/etc/logrotate.d/apache2
und folgenden Inhalt hinzugefügt:
Code: Select all
"/var/www/vhosts/domain1.de/statistics/logs/error_log /var/www/vhosts/domain1.de/statistics/logs/access_log /var/www/vhosts/domain2.de/statistics/logs/error_log /var/www/vhosts/domain2.de/statistics/logs/access_log" {
daily
missingok
rotate 10
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
if [ -f /var/run/apache2.pid ]; then
/etc/init.d/apache2 restart > /dev/null
fi
endscript
}
Code: Select all
ls -l /var/www/vhosts/domain1.de/statistics/logs/
Code: Select all
localhost:/etc/logrotate.d# ls -l /var/www/vhosts/domain1.de/statistics/logs/
total 2625180
-rw-r--r-- 1 root root 2661840277 2007-02-03 11:21 access_log
-rw-r--r-- 1 root root 23705774 2007-02-03 11:21 error_log
Woran liegts?