Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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!

share|improve this question

1 Answer 1

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

 
discard

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