Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here's a vhost example of my sites:

<VirtualHost *:80>
    DocumentRoot /datas/web/woog
    ErrorLog "|/httpd-2.2.8/bin/rotatelogs /logs/woog/error_log 86400"
    CustomLog "|/httpd-2.2.8/bin/rotatelogs /logs/woog/access_log 86400" combined
    DirectoryIndex index.php index.htm

    <Location />
        Allow from All

    <Directory /*>
        Options FollowSymLinks
        AllowOverride Limit AuthConfig


I've got 12 sites running now. This gives something like:

[Shake]:/sources/software/mod_log_rotate# ps x | grep rotate
/httpd-2.2.8/bin/rotatelogs /logs/[hidden siteweb]/error_log 86400
/httpd-2.2.8/bin/rotatelogs /logs/[hidden siteweb]/error_log 86400
[snap (as many error_log as virtual hosts)]
/httpd-2.2.8/bin/rotatelogs /logs/[hidden siteweb]/access_log 86400
/httpd-2.2.8/bin/rotatelogs /logs/[hidden siteweb]/access_log 86400
[snap (as many access_log as virtual hosts)]
grep rotate


I've been looking everywhere but I've only found mod_log_rotate. The "little" problem is that the author (very good C developper) explains: "Unfortunately Apache error logs are handled in such a way that we can't work the same log rotation magic on them. Like transfer logs they support piped logging though so you can still use rotatelogs for them. "

So my question is: what would be the best way to handle multiple logs? If I just do a very classical log and I use the system's "logrotate" program couldn't this be a good deal? How would/do you deal with that?

Thank you!

share|improve this question

Well, I would stay with the current setup, if there is no problem with it. I fail to see how having 24 extra processes can be a problem (unless you are using 486).

When setting up a fresh system, I would use logrotate. Just because I know the tool.

share|improve this answer
"If it's not broken don't fix it". Ok ok. I know the rules. Having 24 processes means (in this case) 24 file handlers. I'm just trying to have a list of process with "ps x" that I can actually use without grep or whatever. This would mean very good job to me and I like very good job ;) Anyway I'll keep on like that. Thanks for your answer. – OlivierDofus Mar 15 '10 at 10:18
Well, I'm glad I could help. – kubanczyk Mar 18 '10 at 11:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.