# Apache init script doesn't load additional modules

## mamunata

Hello,

I'm running apache web server version 2.2.17 on x86 machine. Today I've emerged a few additional modules as mod-evasive and mod-security, but got a problem enabling them on apache start. I've added "-D EVASIVE" configuration option in /etc/conf.d/apache2 and restarted the server but module doesn't seem to load. I can see that apache is started with "-D EVASIVE" in processes list, but executing 

```

apache2 -t -D DUMP_MODULES

```

doesn't list the evasive module. If I put directive in httpd.conf like

```

<IfDefine EVASIVE>

LoadModule evasive_module modules/mod_evasive.so

</IfDefine>

```

module is NOT loaded too but, if remove <IfDefine> condition the magic happens, so this code in httpd.conf works:

```

LoadModule evasive_module modules/mod_evasive.so

```

According to gentoo recommendations in httpd.conf it's not advisable to load modules in httpd.conf though.

Here is the content of modules.d/10_mod_evasive.conf:

```

<IfDefine EVASIVE>

LoadModule evasive_module modules/mod_evasive.so

DOSHashTableSize 3097

DOSPageCount 2

DOSSiteCount 10

DOSPageInterval 2

DOSSiteInterval 2

DOSBlockingPeriod 120

DOSLogDir /var/log/apache2/evasive

</IfDefine>

```

The problem is present and for other moduless too, it's not mod-evasive related - I've described it for an example.

Any help would be appreciated.

----------

## mamunata

Actually it appears that modules are loaded and listed in server-info (mod-info), but not dumped by "apache2 -t -D DUMP_MODULES". May be it's  some apache2 misunderstanding in my side

----------

