module Netcgi_ajp:Apache JServ Protocol (AJP) 1.3 connector.sig
..end
See the Setup section at the end of this file to know
how to configure your web server.
val arg_parse : (Arg.key * Arg.spec * Arg.doc) list ->
Arg.anon_fun -> Arg.usage_msg -> (string * string) list
arg_parse speclist anon_fun usage_msg
parses the command line
and return an associative list describing the content of the
property file (see Netcgi_ajp.props_of_file
). This function
allows to fakes the "java" command (JVM startup):
-classpath <path>
is ignored;speclist
.Failure
and prints a usage message if the property file
cannot be read.val props_of_file : string -> (string * string) list
props_of_file fname
parses the property file fname
and
returns it as an associative list. The following properties are
used:
Invalid_argument
if the file does not exist or is not readable.val run : ?props:(string * string) list ->
?config:Netcgi.config ->
?output_type:Netcgi.output_type ->
?arg_store:Netcgi.arg_store ->
?exn_handler:Netcgi.exn_handler -> ?port:int -> (Netcgi.cgi -> unit) -> unit
run f
executes f cgi
for each AJP request.config
: Default: Netcgi.default_config
output_type
: Default: `Direct ""
arg_store
: Default: `Automatic
for all arguments.exn_handler
: See Netcgi.exn_handler
. Default: delegate
all exceptions to the default handler.port
: The port used by the web server to send the requests
(Default: 8009).You need to use mod_jk to have support for AJP/1.3. To install it, please see Working with mod_jk.
In httpd.conf or in a file, say mod_jk.conf, in /etc/apache/conf.d/, add the following:
LoadModule jk_module mod_jk.so # Declare the module for <IfModule> (remove this line on Apache 2.x) AddModule mod_jk.c <IfModule mod_jserv.c> # Configure mod_jk JkWorkersFile /etc/libapache-mod-jk/workers.properties JkLogFile /var/log/apache/mod_jk.log JkLogLevel info # JkMount <URL pattern> <Worker name> JkMount /*.jsp worker1 JkMount /servlet/* worker1 </IfModule>Here is an example of workers.properties:
# Comma separated list of worker names: worker.list=worker1 # Set properties for worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 worker.worker1.lbfactor=50 worker.worker1.cachesize=10 worker.worker1.cache_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.reclycle_timeout=300
Please mail us setup instructions for other web servers so we can
include them here.