httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell Stanfield <>
Subject [users@httpd] advice on using rotatelogs, CusomLog etc
Date Thu, 25 Jun 2015 09:04:24 GMT
I have been following this site to set up rotatelogs
What I have ended up adding to my Apache servers httpd.conf is this:

CustomLog "|/usr/sbin/rotatelogs -f -c /apps/squid/var_log_httpd/access_log.%Y.%m.%d.%H.%M
86400" commonCustomLog "|/usr/sbin/rotatelogs -f -c /apps/squid/var_log_httpd/error_log.%Y.%m.%d.%H.%M
86400" common
I've commented out these lines:
#ErrorLog logs/error_log#CustomLog logs/access_log combined
My aim is to have the access_log and the error_log turned over daily at midnight. However
I'm not sure what I've added/commented out is actually doing that. I'm thinking that the 2
lines I have added are actually just creating 2 copies of the access_log, just with different
file names. That's because wen I look at the contents of the files generated they are exactly
the same.
I tried adding this:
ErrorLog "|/usr/sbin/rotatelogs -f -c /apps/squid/var_log_httpd/error_log.%Y.%m.%d.%H.%M 86400"
But when I stopped/started Apache I got this error:
Starting httpd: Syntax error on line 559 of /etc/httpd/conf/httpd.conf:ErrorLog takes one
argument, The filename of the error log                                                  

So my question is, does what I've added create and rotate both the access_log and the error_log?
Thanks in advance.

View raw message