Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I have 50 or so vhosts, each logging to /home/SITENAME/logs/access.log. The only way I can see is to add logrotate entries for every vhost - using say /home/*/log/access.log doesn't ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2006
    Posts
    24

    Logrotate for Apache vhost logs


    Hi,

    I have 50 or so vhosts, each logging to /home/SITENAME/logs/access.log. The only way I can see is to add logrotate entries for every vhost - using say /home/*/log/access.log doesn't seem to work in logrotate.

    Any thoughts on a solution? Of course I could add an entry to logrotate every time I add a new site, I was just looking for something cleverer, plus each logrotate entry for the vhost would involve restarting apache

  2. #2
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    This may or may not solve your problems, but apache does have its own log rotation facility. See the manpages for rotatelogs(8).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •