Hi,
I have been following this site to set up rotatelogs
http://httpd.apache.org/docs/2.2/programs/rotatelogs.html
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" common
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                               
                            [FAILED]

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


                                          

Reply via email to