Apache access logs by week, day, hour round robin settings
<virtualhost *:80>
ServerAdmin [email protected]
DocumentRoot "/data/www/bbs
ServerName www.test.com
Serveralias www.dummy-host.example.com
# customlog "|/usr/local/sbin/cronolog/app/logs/access_%y%m%d_www.log" combined
# customlog "|/usr/local/sbin/cronolog/app/logs/access_%w_www.log" combined
Customlog "|/usr/local/sbin/cronolog/app/logs/access_%y%m%d%h_www.log" combined
Errorlog "/app/logs/error_www.log"
# errorlog "Logs/dummy-host.example.com-error_log"
# errorlog "Logs/dummy-host.example.com-error_log"
# customlog "Logs/dummy-host.example.com-access_log" common
</VirtualHost>
Points:
1. Installing the Cronolog tool
wget http://cronolog.org/download/cronolog-1.6.2.tar.gz
TAR-ZVXF cronolog-1.6.2.tar.gz
CD cronolog-1.6.2
./configuer
Make && make install
2.CustomLog "|/usr/local/sbin/cronolog/app/logs/access_%y%m%d%h_www.log" combined
The log path here, to use the absolute path
NOTE: The Apache version number is: 2.2.29 centos5.8 64-bit
Apache access logs by week, day, hour round robin settings