1

Here's a vhost example of my sites:

<VirtualHost *:80>
    DocumentRoot /datas/web/woog
    ServerName woog.com
    ServerAlias www.woog.com
    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
    </Location>

    <Directory /*>
        Options FollowSymLinks
        AllowOverride Limit AuthConfig
    </Directory>

</VirtualHost>

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
[Shake]:/sources/software/mod_log_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!

1 Answer 1

0

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.

2
  • "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, 2010 at 10:18
  • Well, I'm glad I could help.
    – kubanczyk
    Mar 18, 2010 at 11:32

You must log in to answer this question.