1

I have Debian 9 with Apache/2.4.29 (Bitnami appliance with Moodle). I'm trying to secure web server with mod_evasive and mod_security modules. I installed the module:

apt-get install libapache2-mod-evasive

but when I run

apacheclt -M | grep eva

there is no evasive module. I can see the module mod_evasive20.so in /usr/lib/apache2/modules. Is it possible to somehow enable the module? Thank you

EDIT: I just run

service --status-all

to list all running services with their status and this is the output:

[ - ]  acpid
[ + ]  atd
[ + ]  bitnami
[ + ]  cron
[ + ]  exim4
[ + ]  haveged
[ - ]  hwclock.sh
[ - ]  irqbalance
[ + ]  kmod
[ + ]  networking
[ + ]  open-vm-tools
[ + ]  procps
[ + ]  proftpd
[ - ]  screen-cleanup
[ + ]  ssh
[ - ]  sudo
[ + ]  syslog-ng
[ + ]  udev
[ + ]  ufw
[ - ]  x11-common

As you can see, there is no apache or apache2 service. Is this normal?

EDIT: Yesterday I installed clean Debian 9 with mod_evasive and everything worked at first try, so it's because of bitnami and the differencies in folder structure.

0

Normally you enable apache2 module by command:

a2enmod module_name

About mod_evasive20 - I've had very serious problems trying to make it work in any way and found newer version of the module in source code form for Apache 2.4. That was the issue - the old=stable=repo version is for Apache 2.0 at its best.

You need to install apache2-dev package and compile module by command:

apxs -i -a -c mod_evasive24.c

Then you need to create configuration file for it and restart apache to make it work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.