Apache,logerror和logrotate:什么是最好的方法?

以下是我的网站的虚拟示例:

<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> 

我现在有12个网站在运行。 这给了像这样的东西:

 [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# 

我一直在寻找,但我只findmod_log_rotate。 “很less”的问题是作者(非常好的C开发人员)解释说:“不幸的是,Apache错误日志的处理方式使得我们无法在它们上面使用相同的日志循环魔法。就像传输日志,它们支持pipe道日志所以你仍然可以为他们使用rotatelogs。“

所以我的问题是:什么是处理多个日志的最佳方法? 如果我只是做一个非常古典的日志,我使用系统的“logrotate”程序不是一个很好的交易? 你怎么处理这个问题?

谢谢!

那么,我会留在目前的设置,如果没有问题。 我没有看到24个额外的进程可能是一个问题(除非你使用的是486)。

当build立一个新的系统,我会使用logrotate。 只是因为我知道这个工具。