最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
apache虚拟主机访问日志配置例子
时间:2022-06-30 18:02:50 编辑:袖梨 来源:一聚教程网
下面先看linux与windows中日志的配置命令
Linux系统配置方法:
将其改为
代码如下 | 复制代码 |
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″ common |
## 这是httpd.conf中的log日志代码:
代码如下 | 复制代码 |
#ErrorLog "logs/error_log" ErrorLog "|/usr/local/cronolog/sbin/cronolog /usr/local/apache-2.2.15/logs/error_log_%Y%m%d" LogLevel warn LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio 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 |
Windows系统下配置方法:
代码如下 | 复制代码 |
ErrorLog “|bin/rotatelogs.exe logs/site1/error-%y%m%d.log 86400 480″ |
具体访问日志例子
代码如下 | 复制代码 |
CustomLog "|bin/rotatelogs.exe logs/vicp_net_access-%y%m%d.log 86400 480" common RewriteEngine On
|
相关文章
- 王者荣耀侦探能力大测试攻略 王者荣耀侦探能力大测试怎么过 11-22
- 无期迷途主线前瞻兑换码是什么 11-22
- 原神欧洛伦怎么培养 11-22
- 炉石传说网易云音乐联动怎么玩 11-22
- 永劫无间手游确幸转盘怎么样 11-22
- 无期迷途主线前瞻兑换码是什么 无期迷途主线前瞻直播兑换码介绍 11-22