Apache2 module for Webware WebKit
Author: Jay Love (jsliv@jslove.org)
February 2, 2001
Updated for Apache2 November 2002

This is a native Apache module for communicating with the Webware WebKit
AppServer.

ATTENTION: The Makefile included here is for a standard built from source
Apache2 install. It may not work with some Linux distributions prepackaged
Apache packages (like Redhat 8).

This is a DSO only module at this time. Not because it must be so, but
because I haven't adjusted the Makefile for static building. If you
prefer static apache modules, just follow the Apache directions for building.
There are 2 source files, mod_webkit.c and marshal.c.

Ordinarily Apache only makes the username available to WebKit for
password protected pages, keeping the password secret. See the
Makefile on how to let mod_webkit pass that information anyway.

To build, just run 'make'. The Makefile uses apxs for the building and
installing, so you'll need to have that installed. If you're running an
RPM based distribution, it's usually included in apache-devel. Also, the
Makefile assumes apxs is in your path. If it's not, you'll need to adjust
the Makefile so that APXS points to the full path to apxs.

To install, run 'make install'. Then modify httpd.conf to load the module.

To build on Windows, use the Microsoft Visual C++ project file mod_webkit.dsp,
or use msvctk.bat with the free Microsoft Visual C++ 2003 Toolkit.
For your convenience, a pre-compiled mod_webkit.dll is already included in
this directory, just place it into your Apache modules directory.

To enable this module for serving WebKit content, just set the handler for
a directory to 'webkit-handler'. Then inform the module where the appserver
is running using the WKServer configuration directive. It takes 2
arguments, the host and then the port that the AppServer is running on.

My httpd.conf looks like this:
-----------------------------------------------------
LoadModule webkit_module modules/mod_webkit.so

<Location /WK>
WKServer localhost 8086
SetHandler webkit-handler
</Location>
-----------------------------------------------------

You can also set Apache to direct PSP files to the AppServer, regardless of
where they are located. The following configuration settings will do that:

AddType text/psp .psp
AddHandler psp-handler .psp

You'll need to have set a server wide WKServer directive for this to work.
You do that by giving a WKServer directive outside of any directory or
location blocks. Also, the default WKServer settings are 'localhost' and
'8086', so if that is what you are using (it's the default for WebKit),
you don't even need to have a WKServer directive anywhere.

I've included a sample configuration in apache.conf.

That's it for now.
