当前位置: 技术问答>linux和unix
我的apache让我的系统崩溃了……:(
来源: 互联网 发布时间:2015-10-06
本文导语: 请教一个问题,我的系统环境:linux装有apache、mysql服务,apache同时有那个限制同一ip限制连接数的mod_limitipconn 前两天我的机器一连上网系统就反映速度就奇慢无比,后来检查并发现了就是apache进程的原因,再检...
请教一个问题,我的系统环境:linux装有apache、mysql服务,apache同时有那个限制同一ip限制连接数的mod_limitipconn
前两天我的机器一连上网系统就反映速度就奇慢无比,后来检查并发现了就是apache进程的原因,再检查后发现apache的error_log与access_log两个文件达到了8G多,重装了apache并删掉log日志解决问题,但我应该怎么通过log来进行统计那种不正常的超多httpd进程的ip的并能够做到自动封他们的ip吗?
贴贴我的部分error_log日志:
[Sat Jun 25 22:24:21 2005] [error] [client 219.133.216.154] Rejecting client at 219.133.216.154
[Sat Jun 25 22:24:21 2005] [error] [client 222.183.95.53] Rejecting client at 222.183.95.53, referer: http://mp3.baidu.com/m?f=ms&rn=&tn=baidump3&ct=134217728&word=mariah&lm=-1
[Sat Jun 25 22:24:21 2005] [error] [client 219.133.216.154] Rejecting client at 219.133.216.154
[Sat Jun 25 22:24:21 2005] [error] [client 219.133.216.154] Rejecting client at 219.133.216.154
[Sat Jun 25 22:24:21 2005] [error] [client 219.133.216.154] Rejecting client at 219.133.216.154
[Sat Jun 25 22:24:21 2005] [error] [client 219.133.216.154] Rejecting client at 219.133.216.154
[Sat Jun 25 22:24:21 2005] [error] [client 222.183.95.53] Rejecting client at 222.183.95.53, referer: http://mp3.baidu.com/m?f=ms&rn=&tn=baidump3&ct=134217728&word=mariah&lm=-1
[Sat Jun 25 22:24:21 2005] [error] [client 221.221.155.242] Rejecting client at 221.221.155.242, referer: http://202.115.18.88/mp3file/xcdxf5xb7xc6
前两天我的机器一连上网系统就反映速度就奇慢无比,后来检查并发现了就是apache进程的原因,再检查后发现apache的error_log与access_log两个文件达到了8G多,重装了apache并删掉log日志解决问题,但我应该怎么通过log来进行统计那种不正常的超多httpd进程的ip的并能够做到自动封他们的ip吗?
贴贴我的部分error_log日志:
[Sat Jun 25 22:24:21 2005] [error] [client 219.133.216.154] Rejecting client at 219.133.216.154
[Sat Jun 25 22:24:21 2005] [error] [client 222.183.95.53] Rejecting client at 222.183.95.53, referer: http://mp3.baidu.com/m?f=ms&rn=&tn=baidump3&ct=134217728&word=mariah&lm=-1
[Sat Jun 25 22:24:21 2005] [error] [client 219.133.216.154] Rejecting client at 219.133.216.154
[Sat Jun 25 22:24:21 2005] [error] [client 219.133.216.154] Rejecting client at 219.133.216.154
[Sat Jun 25 22:24:21 2005] [error] [client 219.133.216.154] Rejecting client at 219.133.216.154
[Sat Jun 25 22:24:21 2005] [error] [client 219.133.216.154] Rejecting client at 219.133.216.154
[Sat Jun 25 22:24:21 2005] [error] [client 222.183.95.53] Rejecting client at 222.183.95.53, referer: http://mp3.baidu.com/m?f=ms&rn=&tn=baidump3&ct=134217728&word=mariah&lm=-1
[Sat Jun 25 22:24:21 2005] [error] [client 221.221.155.242] Rejecting client at 221.221.155.242, referer: http://202.115.18.88/mp3file/xcdxf5xb7xc6
|
恐怕要自己写日志管理的东西了,或者你可以看看有没有专门分析apache日志的东西(估计就算有也不一定会帮你封ip),另外实在需要封ip的话,用防火墙试试看,snort可以结合iptables来完成封阻恶意用户的功能
|
学习
|
mod_limitipconn 是什么