1. Porting a simple C module from Apache 1.3 to 2.0: Please help!!!
Hello everyone!
I have a simple Apache module written in C that was working fine
with Apache 1.3 but I can't get it to work with Apache 2.0.44.
Basically it's simply a content handler that for any URL beginning
with /MyDirectory will generate some HTML content. With Apache 1.3
I had the following lines in my httpd.conf:
LoadModule my_module libexec/mod_my.so
<Location /MyDirectory>
SetHandler my-handler
</Location>
But now in Apache 2.0 since the handler_rec structure doesn't exist
anymore I can't figure out what to put on the SetHandler line instead
of "my-handler"!! I tried a few things but my handler is never called!!
Could someone please show me what I am missing??
With the help of the documentation at httpd.apache.org/docs-2.0/ I
modified my module to be compatible with Apache 2.0. For Apache 1.3 I
was using the Oreilly book "Apache Modules", is there an equivalent
programming book for 2.0? Here's the code for mod_my.c:
#include "httpd.h"
#include "http_config.h"
#include "http_core.h"
#include "http_log.h"
#include "http_protocol.h"
module AP_MODULE_DECLARE_DATA my_module;
/* here's the content handler */
static int aisserver_content_handler(request_rec *r)
{
/* The code for my handler is here... But it is never called! ***
return OK;
static void my_register_hooks(apr_pool_t *p)
{
ap_hook_handler(my_content_handler, NULL, NULL, APR_HOOK_FIRST);
/* Tell Apache what phases of the transaction we handle */
module AP_MODULE_DECLARE_DATA aisserver_module =
{
STANDARD20_MODULE_STUFF,
NULL, /* per-directory config creator */
NULL, /* per-directory config merger */
NULL, /* per-server config creator */
NULL, /* per-server config merger */
NULL, /* command handlers */
NULL, /* handlers */
my_register_hooks /* register hooks */
2. Good directory structures...any ideas?
3. Simple question about DIAL IN (mgetty) , please help
4. Probably an RTMF...
5. Please help. Simple Question
6. REMOTE_USER not set in apache 1.1.1?
7. I'm new Please help with simple question
8. kernel too large after build??
9. Please help with KDE3 (simple question)
10. simple question about ethernet, please help
11. Simple text format question -- PLEASE HELP
12. Simple question on cc - please help
13. stupid simple question, please help