# see "man logrotate" for details
# rotate log files weekly
monthly
#weekly
# keep 4 weeks worth of backlogs
rotate 72
# create new (empty) log files after rotating old ones
create
# use date as a suffix of the rotated file
dateext
# uncomment this if you want your log files compressed
compress
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp and btmp -- we'll rotate them here
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}
/var/log/btmp {
missingok
monthly
create 0600 root utmp
rotate 1
}
/var/log/httpd/XXX.ru-access_log {
weekly
create
compress
rotate 72
}
# system-specific logs may be also be configured here.
А для конкретного файла лога нужного мне виртуального XXX.ru хоста нет!
это как я понимаю каждые 72 недели будет работать.
Нет, это должно работать каждую неделю, а хранить - за последние 72.
Вообще, к апачу обычно прикладывается конфиг для logrotate. Обычно там предлагается релоад в postrotate и пр. удобства. Надежнее изменить под себя существующий и заведомо работавший.
В приведенном - явно видна нехватка параметров create (mode owner group) - может, поэтому не работает... Ну, и путь с именем файла внимательно проверьте.
...И ты поймешь: все то, чего нельзя –
Песчинка в том, что не запрещено...