移花宫资源网 Design By www.nbddc.com
通常我们是在{$apache}/conf/httpd.conf中设置Apache的参数,然而我们并没有发现可以设置日志文件大小的配置指令,通过参考http://httpd.apache.org/docs/2.0/programs/rotatelogs.html,可以用apache 自己的程序 rotatelogs.exe(位于 {$apache}/bin/目录下),来限制日志文件的大小。
Usage: rotatelogs [-l] [offset minutes from UTC] or
Add this:
TransferLog "|rotatelogs /some/where 86400"
or
TransferLog "|rotatelogs /some/where 5M"
to httpd.conf. The generated name will be /some/where.nnnn where nnnn is the system time at which the log nominally starts (N.B. if using a rotation time, the time will always be a multiple of the rotation time, so you can synchronizecron scripts with it). At the end of each rotation time or when the file size is reached a new log is started.
在 Windows 下的设置例子如下:
# 限制错误日志文件为 1M
ErrorLog "|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 1M"
# 每天生成一个错误日志文件
#ErrorLog "|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 86400"
# 限制访问日志文件为 1M
CustomLog "|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 1M" common
# 每天生成一个访问日志文件
#CustomLog "|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 86400" common
linux/Unix下 应该类似。
Usage: rotatelogs [-l] [offset minutes from UTC] or
Add this:
TransferLog "|rotatelogs /some/where 86400"
or
TransferLog "|rotatelogs /some/where 5M"
to httpd.conf. The generated name will be /some/where.nnnn where nnnn is the system time at which the log nominally starts (N.B. if using a rotation time, the time will always be a multiple of the rotation time, so you can synchronizecron scripts with it). At the end of each rotation time or when the file size is reached a new log is started.
在 Windows 下的设置例子如下:
# 限制错误日志文件为 1M
ErrorLog "|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 1M"
# 每天生成一个错误日志文件
#ErrorLog "|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 86400"
# 限制访问日志文件为 1M
CustomLog "|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 1M" common
# 每天生成一个访问日志文件
#CustomLog "|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 86400" common
linux/Unix下 应该类似。
移花宫资源网 Design By www.nbddc.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
移花宫资源网 Design By www.nbddc.com
暂无评论...
更新日志
2024年06月14日
2024年06月14日
- 黄家驹《怀念专辑》纯银版[WAV+CUE][730MB]
- 邓丽君《黄金唱片》DSD+SBM版[WAV+CUE][470MB]
- 陈百强《感恩有你》DSD+SBM版[WAV+CUE][560MB]
- 世界启元光秀强度怎么样 光秀属性面板解析
- 世界启元古希腊文明怎么样 古希腊文明选择推荐
- 世界启元法兰西文明怎么样 法兰西文明选择推荐
- 群星《极度深情3CD》[WAV分轨]
- 群星《极品HIFI·女声情烧30首HQCD》2CD[WAV]
- 闽南语发烧音乐至尊典藏-《迷醉的歌声·声声醉》[WAV】
- 悔悟了?IGN法国为《黑神话》争议言论正式致歉
- Xbox发布会汇总:战争机器、毁灭战士新作亮相!
- IGN法国无知发言开团《黑神话》:金箍棒不是棉签
- 群星.2002-欢庆迪斯尼100周年3CD【滚石】【WAV+CUE】
- DRY.1998-TWO【正东】【WAV+CUE】
- 马常胜.2012-油菜花开的季节【风潮】【WAV+CUE】