1

I'm testing a scenario where, I'm hosting two-site on same machine with help of apache web server. I'm looking to enable mod_evasive for only one site. I don't see any way to get it working. Following is the scenario and things I have tried.

  • Ubuntu 16.04 with Apache2 Web/httpd server
  • enable host with respective conf files for wwww.site1.com and wwww.site2.com
  • Install and enable mod_evasive with "apt-get install libapache2-mod-evasive"
  • I only want the mod_evasive for www.site1.com

Things I have tried.

[1] Enabling mod_evasive on global level and add following to site1.conf. This affects both site1 and site2.

<IfModule mod_evasive20.c> DOSHashTableSize 3097 DOSPageCount 2 DOSSiteCount 10 DOSPageInterval 10 DOSSiteInterval 100 DOSBlockingPeriod 10 DOSLogDir /var/log/mod_evasive </IfModule> 

[2] Disabling mod_evasive on globla level and load evasive module + conf on tthe site1. Still it applied for both the site.

[3] Added DOSBlockinfPeriod == 0 to site2. But still no luck.

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

Need help on configuration that allows mod_evasive for only one virtual host OR allow override props per virtual host ".conf" files.

1 Answer 1

0

You should use the same version of mod_evasive installed on your system 2.4 or 2.0

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.