Created
December 7, 2014 07:12
-
-
Save kjmkznr/406471b5404a8ccb4c7f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* mod_hello - Hello World for Apache 2.2 | |
* | |
* Copyright(c) 2014, KOJIMA Kazunori | |
* | |
* License: Apache License, Version 2.0 | |
* | |
* Install: | |
* $ apxs -c mod_hello.c | |
* $ sudo apxs -i -a -n hello mod_hello.la | |
*/ | |
#define CORE_PRIVATE | |
#include "httpd.h" | |
#include "http_log.h" | |
static const char *hello(cmd_parms *cmd, void *dummy, const char *arg) | |
{ | |
ap_log_error(APLOG_MARK,APLOG_NOTICE|APLOG_NOERRNO, 0 ,NULL, "Hello %s", arg); | |
return NULL; | |
} | |
static const command_rec hello_cmds[] = { | |
AP_INIT_TAKE1("Hello", hello, NULL, RSRC_CONF | EXEC_ON_READ, "Hello need one argment"), | |
{NULL} | |
}; | |
module AP_MODULE_DECLARE_DATA hello_module = | |
{ | |
STANDARD20_MODULE_STUFF, | |
NULL, /* create per-dir config */ | |
NULL, /* merge per-dir config */ | |
NULL, /* create per-server config */ | |
NULL, /* merge per-server config */ | |
hello_cmds, /* table of config file commands */ | |
NULL /* handlers registration */ | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment