mod_evasive icon indicating copy to clipboard operation
mod_evasive copied to clipboard

Invalid command 'DOSWhitelistUri'

Open netllama opened this issue 11 months ago • 2 comments

I'm running version 2.3 on a Fedora41(Linux) server with apache-2.4.62. I wanted to use the DOSWhitelistUri option in mod_evasive.conf, but apache refuses to start as soon as I add that option:

AH00526: Syntax error on line 69 of /etc/httpd/conf.d/mod_evasive.conf:
Invalid command 'DOSWhitelistUri', perhaps misspelled or defined by a module not included in the server configuration

Line 69 of my /etc/httpd/conf.d/mod_evasive.conf: is simply:

DOSWhitelistUri                /test0

netllama avatar Jan 16 '25 00:01 netllama

It is always a good idea to surround mod config with IfModule tags:

<IfModule mod_evasive.c>
    DOSWhitelistUri                /test0
</IfModule>

If Apache still won't start with this config, something is definitely wrong with the module.

If it does then start, but nothing seems to have changed, then the module isn't being loaded. You should have this line somewhere in your Apache config:

LoadModule evasive_module modules/mod_evasive.so

Let me know if that helps!

jvdmr avatar Jan 23 '25 10:01 jvdmr

On my Fedora system, the module is /usr/lib64/httpd/modules/mod_evasive24.so so I have

LoadModule evasive_module modules/mod_evasive24.so
<IfModule mod_evasive24.c>
...

netllama avatar Jan 27 '25 02:01 netllama