In a setup very much like: http://wiki.apache.org/httpd/ExtendingPrivilegeSeparation I have logs located in /var/weblog/<domain>/error_log
I would like to use logrotate to rotate these logs 50M, gzip the rest, and keep 5.
Instead of repeating the same section over and over again, I'm wondering if I can use something like:
/var/weblog/*/error_log {
missingok
rotate 5
delaycompress
compress
size 50M
sharedscripts
postrotate
/opt/bw/sbin/bw_apachectl.sh reload $1
endscript
}
to match the domain and use it in the script.