
INSTALL
=======


DSO
---

Compiling the module as a dynamic library is easy. Go to
the folder that contains the source code for your Apache
branch, and type the following:

    apxs -cia mod_security.c
    apachectl stop
    apachectl start

Of course, now you need to add mod_security specific
directives to make it do something. Take a look at files
httpd.conf.example-minimal or httpd.conf.example-full to
get some idea of that to do. Or even better, read the manual.


Apache 1.x static compilation
-----------------------------

To compile the module into the body of the web server do
the following:

    1. Copy the file mod_security.c to /src/modules/extra

    2. Configure Apache distribution with two additional
       configuration options:

       --activate-module=src/modules/extra/mod_security
       --enable-module=securit

    3. Compile and install as usual


Apache 2.x static compilation
-----------------------------

At the moment it seems that there is no definitive documentation
on how to compile a module into the body of an Apache 2.x web
server. The procedure I use is as follows (valid for Apache
2.0.45, the last version at the time of writing):

    1. Configure Apache instructing it to include mod_security:

       --with-module=mappers:security

    2. Copy the file mod_security.c to modules/mappers/

    3. Edit modules/mappers/modules.mk and add the following to it:

       mod_security.la: mod_security.lo
           $(MOD_LINK) mod_security.lo

       ^ please note that this is a TAB character

       Also, add "mod_security.la" to the "static = " line:

       static = mod_negotiation.la mod_security.la mod_dir.la ...

     4. You can proceed to compile the server:

       make
       make install
       apachectl stop
       apachectl start
