For example, I want to set rules for all files under /home/example_user/public/ and all logs are actually located in different sub-directories like this: /home/example_user/public/siteA/access.log, /home/example_user/public/siteB/seperate/error.log, etc. What should I do? Would this do the trick:

/home/example_user/public/*/*.log {
rotate 10


Yes the logrotate configuration which you have provided will work.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.