Next, let's take a look at the log configuration commands in linux and windows.
Linux system configuration method:
Change it
The code is as follows: |
Copy code |
ErrorLog "|/usr/local/apache/bin/rotatelogs/home/logs/www/% Y _ % m _ % d_error_log 86400 480 & Prime; CustomLog "|/usr/local/apache/bin/rotatelogs/home/logs/www/% Y _ % m _ % d_access_log 86400 480 & Prime; common |
# This is the log code in httpd. conf:
The code is as follows: |
Copy code |
# ErrorLog "logs/error_log" ErrorLog "|/usr/local/cronolog/sbin/cronolog/usr/local/apache-2.2.15/logs/error_log _ % Y % m % d" LogLevel warn <IfModule log_config_module> LogFormat "% h % l % u % t \" % r \ "%> s % B \" % {Referer} I \ "\" % {User-Agent} I \ "" combined LogFormat "% h % l % u % t \" % r \ "%> s % B" common <IfModule logio_module> LogFormat "% h % l % u % t \" % r \ "%> s % B \" % {Referer} I \ "\" % {User-Agent} I \ "% I % O" combinedio </IfModule> CustomLog "|/usr/local/cronolog/sbin/cronolog/usr/local/apache-2.2.15/logs/access_log _ % Y % m % d" combined CustomLog "|/usr/local/cronolog/sbin/cronolog/usr/local/apache-2.2.15/logs/referer_log" Referer CustomLog "|/usr/local/cronolog/sbin/cronolog/usr/local/apache-2.2.15/logs/agent_log" Agent # CustomLog "logs/access_log" combined </IfModule> |
Configuration method in Windows:
The code is as follows: |
Copy code |
ErrorLog "| bin/rotatelogs.exe logs/site1/error-% y % m % d. log 86400 480 & Prime; CustomLog "| bin/rotatelogs.exe logs/site1/access-% y % m % d. log 86400 480 & Prime; common |
Access log examples
The code is as follows: |
Copy code |
<Virtualhost192.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>
|