Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (23 sloc) 634 Bytes


Hassle-free module authoring for Apache 2.

Example code:

#include "http_protocol.h"

int handle_request(request_rec *r) {
	ap_set_content_type(r, "text/html; charset=UTF-8");
	ap_rputs("Hello, modlet world!", r);
	return OK;

Save as hello.c and compile it with:

apxs2 -c hello.c

Example config:

LoadModule modlet_module /path/to/
<VirtualHost *:80>
	Modlet hello /path/to/

	<Location /hello>
		SetHandler hello

Restart Apache and test it:

$ curl
Hello, modlet world!