A small note on DSO
The DSO support for loading individual Apache modules is based on a module named mod_so which must be statically compiled into the Apache core. To simplify this creation of DSO files for Apache modules (especially for third-party modules) a new support program named apxs (APache eXtenSion) is available. It can be used to build DSO based modules outside of the Apache source tree.
Configure Apache for later installation of shared modules:
This can be done by adding the switch "--enable-so" during the apache configuration.
./configure --enable-so
make
make install
To check mod_so is enabled can be found using the command,
=-=-
httpd -l | grep mod_so
mod_so
-==-
Once this is enabled, proceed with the installation of mod_evasive using the command,
cd /usr/local/src/
#wget http://www.zdziarski.com/blog/wp-content/uploads/2010/02/mod_evasive_1.10.1.tar.gz
# tar -xvzf mod_evasive_1.10.1.tar.gz
# cd mod_evasive/
# /usr/local/apache/bin/apxs -cia mod_evasive20.c
Once this is installed , "Loadmodule" directive
=====--==-
LoadModule evasive20_module modules/mod_evasive20.so
=-=-=-=
will be enabled. You can verify the module using the command,
=-=-
httpd -M | grep evasive
evasive20_module (shared)
-=--=-=
After that you can follow the below steps,
chmod 755 /usr/local/apache/modules/mod_evasive20.so
[activating module `evasive20' in /usr/local/apache/conf/httpd.conf]
Take a backup of httpd.conf as httpd.conf.bak file and update mod_evasive20.so
-=-=
<IfModule mod_evasive20.c>
DOSHashTableSize 3097
DOSPageCount 2
DOSSiteCount 50
DOSPageInterval 1
DOSSiteInterval 1
DOSBlockingPeriod 10
</IfModule>
-=-=-=
Check apache syntax using the command.
-==-
httpd -t
=-=-
Once the syntax is verified, restart the apache service
-=-=-=-=-=-
/etc/init.d/httpd graceful
-==--==-=-=-
Done
The DSO support for loading individual Apache modules is based on a module named mod_so which must be statically compiled into the Apache core. To simplify this creation of DSO files for Apache modules (especially for third-party modules) a new support program named apxs (APache eXtenSion) is available. It can be used to build DSO based modules outside of the Apache source tree.
Configure Apache for later installation of shared modules:
This can be done by adding the switch "--enable-so" during the apache configuration.
./configure --enable-so
make
make install
To check mod_so is enabled can be found using the command,
=-=-
httpd -l | grep mod_so
mod_so
-==-
Once this is enabled, proceed with the installation of mod_evasive using the command,
cd /usr/local/src/
#wget http://www.zdziarski.com/blog/wp-content/uploads/2010/02/mod_evasive_1.10.1.tar.gz
# tar -xvzf mod_evasive_1.10.1.tar.gz
# cd mod_evasive/
# /usr/local/apache/bin/apxs -cia mod_evasive20.c
Once this is installed , "Loadmodule" directive
=====--==-
LoadModule evasive20_module modules/mod_evasive20.so
=-=-=-=
will be enabled. You can verify the module using the command,
=-=-
httpd -M | grep evasive
evasive20_module (shared)
-=--=-=
After that you can follow the below steps,
chmod 755 /usr/local/apache/modules/mod_evasive20.so
[activating module `evasive20' in /usr/local/apache/conf/httpd.conf]
Take a backup of httpd.conf as httpd.conf.bak file and update mod_evasive20.so
-=-=
<IfModule mod_evasive20.c>
DOSHashTableSize 3097
DOSPageCount 2
DOSSiteCount 50
DOSPageInterval 1
DOSSiteInterval 1
DOSBlockingPeriod 10
</IfModule>
-=-=-=
Check apache syntax using the command.
-==-
httpd -t
=-=-
Once the syntax is verified, restart the apache service
-=-=-=-=-=-
/etc/init.d/httpd graceful
-==--==-=-=-
Done