apache 配置成滾動(dòng)日志的方法
更新時(shí)間:2010年12月17日 10:41:59 作者:
apache默認(rèn)的日志只是1個(gè)文件,隨著訪問量的加大,該日志文件會(huì)越來越大,借助apache的rotatelogs.exe自動(dòng)生成滾動(dòng)日志。
下面配置配置成每24小時(shí)產(chǎn)生1個(gè)新的日志文件:
#先搭建1個(gè)很簡(jiǎn)單網(wǎng)站進(jìn)行訪問
DocumentRoot E:/ApacheTestWeb
<Directory E:/ApacheTestWeb>
AllowOverride None
Allow from all
</Directory>
#修改如下配置:
CustomLog "|D:/Apache2.2/bin/rotatelogs.exe D:/Apache2.2/logs/access.log 86400" common
#先搭建1個(gè)很簡(jiǎn)單網(wǎng)站進(jìn)行訪問
DocumentRoot E:/ApacheTestWeb
<Directory E:/ApacheTestWeb>
AllowOverride None
Allow from all
</Directory>
#修改如下配置:
CustomLog "|D:/Apache2.2/bin/rotatelogs.exe D:/Apache2.2/logs/access.log 86400" common
相關(guān)文章
詳解Linux(Centos)之安裝Nginx及注意事項(xiàng)
Nginx是一個(gè)高性能的HTTP和反向代理服務(wù)器,這篇文章主要介紹了詳解Linux(Centos)之安裝Nginx及注意事項(xiàng),有興趣的可以了解一下。2017-03-03
environments was not found on the java.library.path 問題的解決方法
The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path 問題的解決方法,需要的朋友可以參考下2016-08-08
centos 7中添加一個(gè)新用戶并授權(quán)的步驟詳解
這篇文章主要給大家介紹了關(guān)于在centos 7中添加一個(gè)新用戶并授權(quán)的步驟,文中將實(shí)現(xiàn)的步驟介紹的非常詳細(xì),通過文中介紹的步驟可以輕松的創(chuàng)建一個(gè)新用戶并授權(quán),需要的朋友可以參考借鑒,下面來一起看看吧。2017-08-08
centos7防火墻如何設(shè)置只對(duì)部分端口號(hào)限源
這篇文章主要介紹了centos7防火墻如何設(shè)置只對(duì)部分端口號(hào)限源問題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-06-06
基于Centos7 部署Varnish緩存代理服務(wù)器
這篇文章主要介紹了基于Centos7 部署Varnish緩存代理服務(wù)器,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2020-01-01

