Linux系統配置方法:
將其改為
代碼如下 ErrorLog “| /usr/local/apache/bin/rotatelogs /home/logs/www/%Y_%m_%d_error_log 86400 480″## 這是httpd.conf中的log日志代碼:
代碼如下 #ErrorLog "logs/error_log"Windows系統下配置方法:
代碼如下ErrorLog “|bin/rotatelogs.exe logs/site1/error-%y%m%d.log 86400 480″
CustomLog “|bin/rotatelogs.exe logs/site1/access-%y%m%d.log 86400 480″ common
具體訪問日志例子
代碼如下
<VirtualHost 192.168.1.3:588>
DocumentRoot "E:/zzz/"
ServerName 192.168.1.3
CustomLog "|bin/rotatelogs.exe logs/vicp_net_access-%y%m%d.log 86400 480" common
RewriteEngine On
RewriteRule /wp-([0-9]+)(.?)$ /plus/list.php?tid=$1
RewriteRule /wp-([0-9]+)-([0-9]+)-([0-9]+)(.?)$ /plus/list.php?tid=$1&totalresult=$2&ageNo=$3
RewriteRule /([0-9]+)(.?)$ /plus/view.php?arcID=$1
</VirtualHost>