+ -
当前位置:首页 → 问答吧 → Apache Log不记录图片文件

Apache Log不记录图片文件

时间:2007-08-31

来源:互联网

关于apache日志的记录。

1、安装cronlog。
复制PHP内容到剪贴板
PHP代码:
apche/httpd/http.conf文件



<VirtualHost 202.84.14.33:80>

    ServerAdmin [email][email protected][/email]

    DocumentRoot /data/www/cu

    ServerName  bbs.chinaunix.net

    ServerAlias [url]www.chinaunix.net[/url]

#    ErrorLog /data/apache2/logs/search-error_log

#    CustomLog /data/apache2/logs/search-access_log common



CustomLog "|/usr/sbin/cronolog /logs/bbs.chinaunix.net/access.%Y%m%d" combined

env=!gif-image 

--说明:调用usr/sbin/cronolog工具,在系统/log/searcher.china.com/目录中,生成access.×年×月×日的文件。但是日志中不记录gif-image的记录,gif-image在apache中已经定义。

ErrorLog  "|/usr/sbin/cronolog /logs/bbs.chinaunix.net/errors.%Y%m%d"



--说明:调用usr/sbin/cronolog工具,在系统/log/bbs.chinaunix.net/目录中,生成error.×年×月×日的文件。



</VirtualHost>



#crontab -e 





# Upload searcher's logs and delete old logs 15 days ago. Added by peng, 200405

04 20 3 * * * /usr/bin/find /logs/searcher.china.com/Old -mtime +15 |xargs rm

作者: netseek   发布时间: 2007-08-31

汗..兄弟升的可真快,成为版主了呀

作者: gleon   发布时间: 2007-09-01

热门下载

更多