Nesting mod_evasive directives within Files, Location, ...

Helicon Ape provides support for Apache .htacces and .htpasswd configuration files for Microsoft IIS.
User avatar
Posts: 11
Joined: 23 Jul 2014, 04:32
Location: Groningen, the Netherlands

Nesting mod_evasive directives within Files, Location, ...

08 Apr 2015, 07:17

Is it possible to nest mod_evasive directives within Files or Location functions? I would like to know if one can enable mod_evasive only for certain URI's, like /wp-login /administrator, and so on.

For example (might not be syntactical correct):

Code: Select all
<VirtualHost *:80>
  LoadModule evasive_module modules/mod_evasive.so
  <IfModule evasive_module>
    #<Files wp-login\.php>
    <Location /wp-admin>
      DOSHashTableSize    2048
      DOSPageCount        20
      DOSSiteCount        150
      DOSPageInterval     2
      DOSSiteInterval     1
      DOSBlockingPeriod   120
    </Location>
    #</Files>
  </IfModule>
</VirtualHost>


WordPress plugins like VisualComposor don't work with mod_evasive very well, so I'd like to be able to secure only login URL's.

When this is not possible, it would make a nice feature for a future release... ;-)

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: Nesting mod_evasive directives within Files, Location, .

09 Apr 2015, 11:32

Hello,

As is said in our docs (http://www.helicontech.com/ape/doc/mod_evasive.htm),
mod_evasive directives can only be used in httpd.conf and <VirtualHost> sections - this is by design as it is supposed to protect the entire server.

Return to Helicon Ape

Who is online

Users browsing this forum: No registered users and 44 guests