Apache vhost and logrotate
Hi,
I have an Apache server configured on a Debian 6.0 machine.
I'm going to have a bunch of vhosts on this server and was wondering how to configure logrotate for them if I don't have the logs in the default folder.
As of now I have it like this. Each vhost has it's own directory in /var/www/vhosts with some subdirs like this:
/var/www/vhosts/example.com:
-> cgi-bin
-> html_doc
-> logs
So everyone can see their own logfiles.
However as default Apache has all the logs in /var/log/apache2 and it rotate the logs just fine there and the logrotate conf for that looks like this:
Code:
/var/log/apache2/*.log {
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
/etc/init.d/apache2 reload > /dev/null
endscript
}
Is it possible to do it like this in my scenario?
Code:
/var/www/vhosts/*/logs/*.log {
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
/etc/init.d/apache2 reload > /dev/null
endscript
}
Or won't it accept two wildcards like that?
Thanks,
-Patric