Apache2 + Mod_Evasive, only for one virtual host?

和自甴很熟 提交于 2021-02-19 16:14:13

问题


I am trying to utilize the mod_evasive for apache2 for one virtualhost only but it appears no matter what i do the module is loaded on the entirety of apache.

I looked through the docs and i cannot find any switch to disable mod evasive in it's own configuration allowing me to enable it only for specific vhosts.

I understand that i could simply do put the default config to ridiculous numbers making it never trigger/ban on the default and then do specific configurations for certain areas i would want it to trigger but that would be a performance hog having evasive run on everything.

How do i go about this? Do i need to put the site that needs to be behind mod evasive on a completely separate apache2 server?


回答1:


Ran into the same problem with proxying Jira and Confluence. They send so many requests it was always blocking. Ended up leaving mod_evasive at the global level and putting the following for vhosts I don't want to block and it has been working:

<IfModule mod_evasive24.c>
    DOSBlockingPeriod 0
</IfModule>


来源:https://stackoverflow.com/questions/50057328/apache2-mod-evasive-only-for-one-virtual-host

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!