问题
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