限制 Apache日志文件大小的方法
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 下的設(shè)置例子如下:
# 限制錯(cuò)誤日志文件為 1M
ErrorLog "|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 1M"
# 每天生成一個(gè)錯(cuò)誤日志文件
#ErrorLog "|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 86400"
# 限制訪問(wèn)日志文件為 1M
CustomLog "|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 1M" common
# 每天生成一個(gè)訪問(wèn)日志文件
#CustomLog "|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 86400" common
linux/Unix下 應(yīng)該類(lèi)似。
相關(guān)文章
Ubuntu Server 14.04升級(jí)Ubuntu Server 16.04
這篇文章主要介紹了 Ubuntu Server 14.04升級(jí)Ubuntu Server 16.04,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下。2016-12-12
deepin linux 手動(dòng)升級(jí)內(nèi)核的方法
這篇文章主要介紹了deepin linux 手動(dòng)升級(jí)內(nèi)核的方法,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2019-12-12
CentOS 5.11服務(wù)器安裝配置LAMP服務(wù)器(Apache+PHP5+MySQL)
這篇文章主要介紹了CentOS 5.11服務(wù)器安裝配置LAMP服務(wù)器(Apache+PHP5+MySQL),需要的朋友可以參考下2016-10-10
新手學(xué)習(xí)Linux系統(tǒng)的11點(diǎn)建議
這篇文章主要為大家詳細(xì)介紹了新手學(xué)習(xí)Linux系統(tǒng)的11點(diǎn)建議,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2016-09-09
淺析Linux中使用nohup及screen運(yùn)行后臺(tái)任務(wù)的示例和區(qū)別
這篇文章主要介紹了Linux中使用nohup及screen運(yùn)行后臺(tái)任務(wù)的示例和區(qū)別,本文給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2019-07-07
在CentOS7上搭建Jenkins+Maven+Git持續(xù)集成環(huán)境的方法
這篇文章主要介紹了在CentOS7上搭建Jenkins+Maven+Git持續(xù)集成環(huán)境的方法,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2019-01-01
VMware Workstation Pro下CentOS 7 64位服務(wù)器安裝教程
這篇文章主要介紹了VMware Workstation Pro下CentOS 7 64位服務(wù)器安裝教程,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-08-08
在Ubuntu中實(shí)現(xiàn)人臉識(shí)別登錄的完整步驟
這篇文章主要給大家介紹了關(guān)于在Ubuntu中實(shí)現(xiàn)人臉識(shí)別登錄的完整步驟,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2020-06-06

