How to Check if mod_evasive is Installed in Apache


check if mod_evasive is installed in apache

mod_evasive is a useful Apache module that not only protects your website from malicious requests, DOS & DDOS attacks but also automatically tracks suspicious IPs & URLs, and blocks them. It also logs each incident and automatically emails admins about it. Let us look how to check if mod_evasive is installed in Apache.

 

How to Check if mod_evasive is Installed in Apache

Here’s how to check if mod_evasive is installed in Apache. Actually, Apache doesn’t have a feature to specifically check if a module is installed or not. You can retrieve a list of all installed modules on your web server and look for your module in it.

Open a terminal session or SSH into your Linux system and run the following command to get a list of installed modules.


$ apachectl -M

In some systems, it is


$ apache2ctl -M

 

You will see output as


$ apachectl -M
Loaded Modules:
core_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
auth_basic_module (shared)
auth_digest_module (shared)
authn_file_module (shared)
authn_alias_module (shared)
authn_anon_module (shared)
authn_dbm_module (shared)
...

 

Look for evasive20 in the output. If it is present, then it means mod_evasive is installed on your apache web server. Otherwise, here are steps the to install it.

 

Here’s a shortcut to list the installed modules and search for mod_evasive module in it.


$ sudo apachectl -M | grep evasive

 

You will see output as


evasive20_module (shared)

 

 

That’s it! You can easily find out if mod_evasive is installed on your Apache web server.

About Sreeram Sreenivasan

Sreeram Sreenivasan is the Founder of Ubiq, a business dashboard & reporting platform for small & medium businesses. Ubiq makes it easy to build business dashboards & reports for your business. Try it for free today!