Operating System - Linux
1820619 Members
1860 Online
109626 Solutions
New Discussion юеВ

Re: how to install mod_security in apache?

 
SOLVED
Go to solution
Maaz
Valued Contributor

how to install mod_security in apache?

Dear Experts
I have download modsecurity-1.8.7.tar.gz, then untar, unzip
#cd modsecurity-1.8.7
#ls apache2
makefile.win mod_security.c

now i also have downlaod the httpd-2.0.54.tar.bz2, untar, and unzip httpd-2.0.54.tar.bz2.

now how to install the apache so that mod_security will also be install during apache installation ?

and one more thing If i have already installed httpd-2.0.54.tar.bz2. via #untar/unzip, then #cd httpd-2.0.54, then #./configure, then #make then #make install
i.e if apache is already installed via source, then how to install mod_security ?

Regards
Maaz

3 REPLIES 3
Matti_Kurkela
Honored Contributor
Solution

Re: how to install mod_security in apache?

When compiling Apache, what options did you pick?

You need the DSO support enabled to be able to add new modules later. If you did not choose DSO support, all the modules must be chosen at the time Apache is compiled.

Introduction to Apache DSO concepts:
http://httpd.apache.org/docs/2.0/dso.html

To compile and install extra modules after building Apache, you need the "apxs" tool, which should be built automatically with Apache:
http://httpd.apache.org/docs/2.0/programs/apxs.html
MK
Sergejs Svitnevs
Honored Contributor

Re: how to install mod_security in apache?

The best way to install mod_security is to compile it from the source code and then add a DSO module to Apache's httpd.conf configuration file (LoadModule ...).

Use these commands for set-up of mod_security module:

# /path/to/apache/bin/apxs -cia mod_security.c
# /path/to/apache/bin/apachectl stop
# /path/to/apache/bin/apachectl start

Regards,
Sergejs
Ivajlo Yanakiev
Respected Contributor

Re: how to install mod_security in apache?

ti depend from version to version.
Read README inside the source tree.