开发者

Using mod_evasive on a specific directory

I'm trying to limit requests to an API on an internal site

I've managed to implement mod_evasive 开发者_JS百科to successfully block requests after a specific amount in a specific time.

But this is causing problems for users of the webUI

I've tried limiting the scope of mod_evasive to the api directory but Apache2 is complaining about an invalid config file

<Location /api >                                                                        
  <IfModule mod_evasive20.c>
    DOSPageCount 2
    DOSSiteCount 50
    ..
  </IfModule>
</Location>

Any ideas SO?


You could move your api service to a subdomain (redirect)

Another idea is use nginx:80 and apache:8080 like a reverse proxy and implement a better config for stop the ddos.

Maybe the ddos you suffer always used the same pattern that can be blocked with (iptables and mbstring) 'look at the accesslog'.

iptables -A INPUT -m string --string 'PATTERN-STRING' --algo bm -j DROP
  • Other tool that can help : http://deflate.medialayer.com/

Good Luck

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜