Summary
Five directives are provided by mod_jk to specify how the HTTP Server communicates with the ASF Tomcat Servlet Engine. These directives go into the HTTP Server (powered by Apache) server configuration file (httpd.conf). Any mod_jk directive usage must be preceded by loading the Service Program that supports mod_jk. The following LoadModule must be in the configuration file prior to the use of any mod_jk directives.
LoadModule mod_jk /QSYS.LIB/QHTTPSVR.LIB/QZTCJK.SRVPGM
Directives
Module: mod_jk | |
Syntax: JkAsfTomcat On | Off | |
Default: JkAsfTomcat On | |
Context: server config | |
Override: none | |
Origin: iSeries™ | |
Usage Considerations: A LoadModule is required in the config file prior to using the directive. The statement should be as follows: LoadModule mod_jk /QSYS.LIB/QHTTPSVR.LIB/QZTCJK.SRVPGM | |
Example: JkAsfTomcat Off |
The JkAsfTomcat directive allows the ASF Tomcat plugin to be turned off without deleting particular plugin directives from the HTTP Server (powered by Apache) configuration file. When this directive is set to Off, it appears to the user as if the servlet engine is not enabled.
Module: mod_jk | |
Syntax: JkLogFile directory-filename | |
Default: none | |
Context: server config | |
Override: none | |
Origin: Apache | |
Usage Considerations: A LoadModule is required in the config file prior to using the directive. The statement should be as follows: LoadModule mod_jk /QSYS.LIB/QHTTPSVR.LIB/QZTCJK.SRVPGM | |
Example: JkLogFile /QIBM/UserData/HTTPA/tomcat/logs/tomcat.log |
The JkLogFile directive is used to specify the full path and file name of the log file for the ASF Tomcat module. For example:
JkLogFile /QIBM/UserData/HTTPA/tomcat/logs/tomcat.log
The log file describes the flows of header and data between the HTTP Server (powered by Apache) and the ASF Tomcat servlet engine. It does not contain information relative to what happens while the servlet engine is processing a request. See the ASF Tomcat servlet engine log for this information. The plugin log file is never purged or wrapped. The file may need to be periodically purged by the administrator.
The directive supports both the Root and QOpenSys file systems.
Module: mod_jk | |
Syntax: JkLogLevel log-level | |
Default: JkLogLevel emerg | |
Context: server config | |
Override: none | |
Origin: Apache | |
Usage Considerations: A LoadModule is required in the config file prior to using the directive. The statement should be as follows: LoadModule mod_jk /QSYS.LIB/QHTTPSVR.LIB/QZTCJK.SRVPGM | |
Example: JkLogLevel error |
The JkLogLevel directive is used to describe what level of detail is written to the log file defined by JkLogFile.
These values correspond to the HTTP Server (powered by Apache) logging level descriptions. For more information, see LogLevel
Module: mod_jk | |
Syntax: JkMount URI-path workername | |
Default: none | |
Context: server config, virtual host | |
Override: none | |
Origin: Apache | |
Usage Considerations: A LoadModule is required in the config file prior to using the directive. The statement should be as follows: LoadModule mod_jk /QSYS.LIB/QHTTPSVR.LIB/QZTCJK.SRVPGM | |
Example: JkMount /servlet/* workerajp12 |
The JkMount directive specifies a mapping between a URI context (or URI pattern) and an ASF Tomcat module worker. The URI context is used to identify which requests are to be handled by the module, and the worker name identifies which worker is used to forward matching requests to the servlet engine.
ASF Tomcat workers are defined in a file specified by the JkWorkersFile directive. This file is used to map a worker name to a worker type and various other settings. The worker type determines whether requests are forwarded by the module to an in-process ASF Tomcat server or an out-of-process ASF Tomcat server.
The URI-path parameter can assume three different forms: exact match, context match and suffix match. All URL path forms must be preceded by a forward slash (/) character (for instance, /Example, /Example/* or /Example/*.jsp).
JkMount /example/SampleServlet jniworker JkMount /SampleServlet jniworker
JkMount /example/* System1worker
JkMount /*.jsp System1worker
All client URL requests that have a .jsp suffix are forwarded to worker System1worker for processing.
Module: mod_jk | |
Syntax: JkMountCopy On | Off | |
Default: JkMountCopy Off | |
Context: virtual host | |
Override: none | |
Origin: Apache | |
Usage Considerations: A LoadModule is required in the config file prior to using the directive. The statement should be as follows: LoadModule mod_jk /QSYS.LIB/QHTTPSVR.LIB/QZTCJK.SRVPGM | |
Example: JkMountCopy On |
The JkMountCopy directive indicates whether the base server mount points should be copied to the virtual server. Any mount points defined outside <VirtualHost> </VirtualHost> are inherited by the virtual host.
Module: mod_jk | |
Syntax: JkWorkersFile directory-filename | |
Default: none | |
Context: server config | |
Override: none | |
Origin: Apache | |
Usage Considerations: A LoadModule is required in the config file prior to using the directive. The statement should be as follows: LoadModule mod_jk /QSYS.LIB/QHTTPSVR.LIB/QZTCJK.SRVPGM | |
Example: JkWorkersFile /home/Tomcat/conf/workers.properties |
The JkWorkersFile directive is used to define the name of a file that contains configuration information that describes how the ASF Tomcat module forwards requests to the servlet engine. The two interfaces, used to support the connection between HTTP Server (powered by Apache) and ASF Tomcat, are JNI (Java™ Native Interface) and sockets connections. The JNI interface is used for an in-process ASF Tomcat server. An in-process ASF Tomcat server runs within the HTTP Server process, or job, and starts up and ends at the same times as the HTTP server. The socket interface is for use with an out-of-process ASF Tomcat server that runs within its own process, or job. With an out-of-process ASF Tomcat server, the server could be on the same system or on a different system. Either the AJP12 or AJP13 protocol may be used by a worker to communicate with an out-of-process ASF Tomcat server.
There is no default; this directive must be specified or ASF Tomcat will not function. The typical file name is workers.properties.
This directive supports both the Root and QOpenSys file systems.