httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Pasher <>
Subject Re: [users@httpd] Logs
Date Thu, 11 Sep 2008 22:10:12 GMT
Grant Peel wrote:
> Hi Justin,
> Thanks for the reply. FYI I am using UNIX (freebsd).
> Up tp this point, I have been using an sh script to rotate logs.
> The logs in question are the access_log and error_log in each one of 
> my (Apache) virtual hosts.
> logrotate looks like the cats meow!
> I have read the man page and it states to use wildcards with caution 
> (as always). So I have one question:
> Can I use a wildcard as such,
> /home/*/logs/access_log
> /home/*/logs/error_log
> The '*' being the wildcard to denote the home dir for
> ...
> -Grant

Wildcards are fine. The man pages problem say to use them with caution 
to avoid matching more files than you really intend. The easiest way to 
be sure is just test the results of the wildcard with ls.

ls /home/*/logs/access_log

If the results are what you expect, then you are good to go. You can 
also combine the two log filenames in the same logrotate rule to avoid 
duplicating your settings.

Just keep in mind that with this setup, if a user has a file such as 
/home/username/logs/access_log, then it will be rotated too. However, if 
your setup doesn't allow users to create arbitrary directories/files 
like that, then there is no need to worry.

Justin Pasher

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message