On Sat, Dec 21, 2013 at 10:09 PM, farid ridho <faridri...@gmail.com> wrote: > I'm going to make simple web application firewall like modsecurity. I want > to write apache module in C for filtering a web attack like SQL injection. > > I put my web on http://localhost/vulweb my question is, when iam accessing > http://localhost/vulweb i want the apache module analysis the request > first, before continuing its to PHP website (if the request is not an > attack). Can anyone help me to explain how to make a module for this > purpose? and how to configure this module (sethandler, addhandler)?? > > PS: I have already know how to write helloworld apache module with C, and > run it through http://localhost/helloworld
use ap_hook_fixups to run before the configured handler. No configuration will be needed, unless you want your own directives.