I developed an apache module in which I am collecting some data from a request. How to call my module for every request by default in Apache? I wrote my module in C.
My Module declaration code
module AP_MODULE_DECLARE_DATA helloworld_module = {
STANDARD20_MODULE_STUFF,
NULL,
NULL,
NULL,
NULL,
NULL,
helloworld_hooks
};
this is my module hook code
static void helloworld_hooks(apr_pool_t *pool)
{
ap_hook_handler(helloworld_handler, NULL, NULL, APR_HOOK_FIRST);
}
this is my module main function code
static int helloworld_handler(request_rec *r)
{
// here I am implementing my all functionality.
}
http.conf file settings
<Location /helloworld>
SetHandler helloworld
</Location>
I want every time request reach to apache my module should invoke automatically.