Invalid command 'DOSWhitelistUri'
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
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!
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>
...