Apache module for Webware WebKit
Author:  Jay Love  (jsliv@jslove.org)
February 2, 2001


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

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.


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', and hope for the best.   In my brief testing, 
make install put the module in the right place, but didn't get the LoadModule 
directive right (On Redhat). If you would rather be safe than sorry, 
run 'make', then copy the resulting mod_webkit.so to your apache module 
directory.  Then modify httpd.conf to load the module.

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
AddModule mod_webkit.c

<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.




