Apache [httpd.conf] configuration file
#ErrorLog "Logs/error.log"
Errorlog "|bin/rotatelogs.exe-l logs/error-%y-%m-%d.log 2M"
Log cutting for virtual hosts under Windows
<virtualhost *:> ServerAdmin [email protected ]"d:/wamp/www " ServerName localhost "logs/localhost-error.log " "logs/localhost-access.log" common</VirtualHost>
After the change
<virtualhost *:> ServerAdmin [email protected ]"d:/wamp/www " ServerName localhost "|bin/rotatelogs.exe-l Logs/localhost-error-%y-%m.log 86400" " |bin/rotatelogs.exe-l logs/localhost-access-%y-% M.log" common</VirtualHost>
or use the following
locate errorlog logs in the Apache configuration file/Error_logcustomlog Logs/Access_log Commonlinux System Configuration method: Change it to errorlog"|/usr/local/apache/bin/rotatelogs/home/logs/www/%y_%m_%d_error_log 86400 480"Customlog"|/usr/local/apache/bin/rotatelogs/home/logs/www/%y_%m_%d_access_log 86400 480"commonwindows System Configuration method: #ErrorLog"|bin/rotatelogs.exe logs/vicp_net_error-%y%m%d.log 86400 480"#CustomLog"|bin/rotatelogs.exe logs/vicp_net_access-%y%m%d.log 86400 480"Common for the first time do not know set 480 this parameter, resulting in a log record time and server time difference of 8 hours, the original is Rotatelogs has an offset parameter, the number of minutes relative to UTC, China is the eighth time zone, the difference of 480 minutes. 86400 is a 1-day representation.
Window Apache Log Split