ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaie_5.4.0.1/rzaiemod_jk.htm

324 lines
21 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="topic" />
<meta name="DC.Title" content="Module mod_jk" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2002,2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2002,2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzaiemod_jk" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Module mod_jk</title>
</head>
<body id="rzaiemod_jk"><a name="rzaiemod_jk"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<!--Java sync-link--><h1 class="topictitle1">Module mod_jk</h1>
<div><div class="important"><span class="importanttitle">Important:</span> Information
for this topic supports the latest PTF levels for HTTP Server for i5/OS .
It is recommended that you install the latest PTFs to upgrade to the latest
level of the HTTP Server for i5/OS. Some of the topics documented here are
not available prior to this update. See <a href="http://www-03.ibm.com/servers/eserver/iseries/software/http/services/service.html" target="_blank">http://www.ibm.com/servers/eserver/iseries/software/http/services/service.htm</a> <img src="www.gif" alt="Link outside Information Center" /> for more information. </div>
<p><strong>Summary</strong></p>
<p>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. </p>
<pre class="block">LoadModule mod_jk /QSYS.LIB/QHTTPSVR.LIB/QZTCJK.SRVPGM</pre>
<p><strong>Directives</strong></p>
<ul><li><a href="#jkasftomcat">JkAsfTomcat</a></li>
<li><a href="#jklogfile">JkLogFile</a></li>
<li><a href="#jkloglevel">JkLogLevel</a></li>
<li><a href="#jkmount">JkMount</a></li>
<li><a href="#jkmountcopy">JkMountCopy</a></li>
<li><a href="#jkworkersfile">JkWorkersFile</a></li>
</ul>
</div>
<div class="hr" id="jkasftomcat"><a name="jkasftomcat"><!-- --></a><h2 class="topictitle2">JkAsfTomcat</h2>
<div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="void" border="0" rules="none"><tbody><tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Module">Module</a></strong>: mod_jk </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: JkAsfTomcat <em>On | Off</em> </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: JkAsfTomcat On</td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="jkasftomcat__jkasftomcat_context"><a name="jkasftomcat__jkasftomcat_context"><!-- --></a>server config </span></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: none </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="jkasftomcat__jkasftomcat_origin"><a name="jkasftomcat__jkasftomcat_origin"><!-- --></a>iSeries™ </span></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__UsageConsiderations">Usage Considerations</a></strong>: 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 </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: JkAsfTomcat Off </td>
</tr>
</tbody>
</table>
</div>
<p>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 <strong>Off</strong>,
it appears to the user as if the servlet engine is not enabled.</p>
<dl class="block"><dt class="dlterm"><strong>Parameter</strong>: <em>On | Off </em></dt>
<dd><ul><li>When set to <em>On</em>, the ASF Tomcat module is enabled. </li>
<li>When set to <em>Off</em>, the module loads, but URL requests are not redirected
to the ASF Tomcat servlet engine. </li>
</ul>
</dd>
</dl>
</div>
</div>
<div class="hr" id="jklogfile"><a name="jklogfile"><!-- --></a><h2 class="topictitle2">JkLogFile</h2>
<div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="void" border="0" rules="none"><tbody><tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Module">Module</a></strong>: mod_jk </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: JkLogFile <em>directory-filename</em> </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: none </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="jklogfile__jklogfile_context"><a name="jklogfile__jklogfile_context"><!-- --></a>server config </span></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: none </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="jklogfile__jklogfile_origin"><a name="jklogfile__jklogfile_origin"><!-- --></a>Apache </span></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__UsageConsiderations">Usage Considerations</a></strong>: 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 </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: JkLogFile /QIBM/UserData/HTTPA/tomcat/logs/tomcat.log </td>
</tr>
</tbody>
</table>
</div>
<p>The JkLogFile directive is used to specify the full path and file name
of the log file for the ASF Tomcat module. For example: </p>
<pre class="block">JkLogFile /QIBM/UserData/HTTPA/tomcat/logs/tomcat.log</pre>
<p>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. </p>
<dl class="block"><dt class="dlterm"><strong>Parameter</strong>: <em>directory-filename </em></dt>
<dd><ul><li>The <em>directory-filename</em> parameter specifies the fully-qualified
directory path and filename for the ASF Tomcat module log file.</li>
</ul>
</dd>
</dl>
<p>The directive supports both the Root and QOpenSys file systems. </p>
</div>
</div>
<div class="hr" id="jkloglevel"><a name="jkloglevel"><!-- --></a><h2 class="topictitle2">JkLogLevel</h2>
<div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="void" border="0" rules="none"><tbody><tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Module">Module</a></strong>: mod_jk </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: JkLogLevel <em>log-level </em></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: JkLogLevel emerg </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="jkloglevel__jkloglevel_context"><a name="jkloglevel__jkloglevel_context"><!-- --></a>server config </span></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: none </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="jkloglevel__jkloglevel_origin"><a name="jkloglevel__jkloglevel_origin"><!-- --></a>Apache </span></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__UsageConsiderations">Usage Considerations</a></strong>: 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 </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: JkLogLevel error </td>
</tr>
</tbody>
</table>
</div>
<p>The JkLogLevel directive is used to describe what level of detail is written
to the log file defined by JkLogFile. </p>
<dl class="block"><dt class="dlterm"><strong>Parameter</strong>: <em>log-level</em></dt>
<dd><ul><li>Possible log level values are: <ul><li>debug</li>
<li>info</li>
<li>error</li>
<li>emerg</li>
</ul>
<p>These values correspond to the HTTP Server (powered by Apache) logging
level descriptions. For more information, see <a href="rzaiemod_core.htm#loglevel">LogLevel</a></p>
</li>
</ul>
</dd>
</dl>
</div>
</div>
<div class="hr" id="jkmount"><a name="jkmount"><!-- --></a><h2 class="topictitle2">JkMount</h2>
<div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="void" border="0" rules="none"><tbody><tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Module">Module</a></strong>: mod_jk </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: JkMount <em>URI-path workername</em> </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: none </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="jkmount__jkmount_context"><a name="jkmount__jkmount_context"><!-- --></a>server config,
virtual host </span></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: none </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="jkmount__jkmount_origin"><a name="jkmount__jkmount_origin"><!-- --></a>Apache </span></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__UsageConsiderations">Usage Considerations</a></strong>: 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 </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: JkMount /servlet/* workerajp12</td>
</tr>
</tbody>
</table>
</div>
<p>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.</p>
<p>ASF Tomcat workers are defined in a file specified by the <a href="#jkworkersfile">JkWorkersFile</a> 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. </p>
<dl class="block"><dt class="dlterm"><strong>Parameter One</strong>: <em>URI-path </em></dt>
<dd><ul><li>The <em>URI-path</em> parameter used by this directive is compared to the
incoming URL from the client browser to determine if the request must be forwarded
to the ASF Tomcat servlet engine. </li>
</ul>
</dd>
</dl>
<dl class="block"><dt class="dlterm"><strong>Parameter Two</strong>: <em>workername </em></dt>
<dd><ul><li>The <em>workername</em> can include the following characters: alpha, numeric,
dash (-), underscore (_), percent (%), and question mark (?). </li>
</ul>
</dd>
</dl>
<p>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). </p>
<ul><li>Exact match is used when JkMount must match exactly to a URL path in the
client URL. For example, for an incoming client URL of http://systemname:port/example/SampleServlet
, JkMount identifies the URL path then the HTTP Server (powered by Apache)
forwards the URL request to the ASF Tomcat worker jniworker. The directive
displays in the form: <pre class="block">JkMount /example/SampleServlet jniworker
JkMount /SampleServlet jniworker</pre>
</li>
<li>Context match forwards client URL requests that have URL paths matching
the directive URL path. This form supports the use of the wildcard character
(*). For example, with an incoming client URL of <em>http://systemname:port/server1/example/samples/ExampleServlet</em>,
JkMount identifies the URL path then the HTTP Server (powered by Apache) forwards
all URL requests with a <em>/example</em> subcontext to the ASF Tomcat worker <strong>System1worker</strong>.
The directive displays in the form: <pre class="block">JkMount /example/* System1worker</pre>
</li>
<li>Suffix match forwards client URL requests that have a particular suffix.
The form is used to support JSPs that are given in the client URL with a suffix
of .jsp. For example: <pre class="block">JkMount /*.jsp System1worker</pre>
<p>All
client URL requests that have a .jsp suffix are forwarded to worker System1worker
for processing. </p>
</li>
</ul>
</div>
</div>
<div class="hr" id="jkmountcopy"><a name="jkmountcopy"><!-- --></a><h2 class="topictitle2">JkMountCopy</h2>
<div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="void" border="0" rules="none"><tbody><tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Module">Module</a></strong>: mod_jk </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: JkMountCopy <em>On | Off </em></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: JkMountCopy Off </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="jkmountcopy__jkmountcopy_context"><a name="jkmountcopy__jkmountcopy_context"><!-- --></a>virtual host </span></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: none </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="jkmountcopy__jkmountcopy_origin"><a name="jkmountcopy__jkmountcopy_origin"><!-- --></a>Apache </span></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__UsageConsiderations">Usage Considerations</a></strong>: 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 </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: JkMountCopy On</td>
</tr>
</tbody>
</table>
</div>
<p>The JkMountCopy directive indicates whether the base server mount points
should be copied to the virtual server. Any mount points defined outside &lt;VirtualHost&gt; &lt;/VirtualHost&gt;
are inherited by the virtual host.</p>
<dl class="block"><dt class="dlterm"><strong>Parameter</strong>: <em>On | Off </em></dt>
<dd><ul><li>When set to <em>On</em>, the base server mount points are copied to the
virtual server. </li>
<li>When set to <em>Off</em>, the base server mount points are not copied to
the virtual server.</li>
</ul>
</dd>
</dl>
</div>
</div>
<div class="hr" id="jkworkersfile"><a name="jkworkersfile"><!-- --></a><h2 class="topictitle2">JkWorkersFile</h2>
<div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="void" border="0" rules="none"><tbody><tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Module">Module</a></strong>: mod_jk </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: JkWorkersFile <em>directory-filename </em></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: none </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="jkworkersfile__jkworkersfile_context"><a name="jkworkersfile__jkworkersfile_context"><!-- --></a>server config </span></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: none </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="jkworkersfile__jkworkersfile_origin"><a name="jkworkersfile__jkworkersfile_origin"><!-- --></a>Apache </span></td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__UsageConsiderations">Usage Considerations</a></strong>: 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 </td>
</tr>
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: JkWorkersFile /home/Tomcat/conf/workers.properties </td>
</tr>
</tbody>
</table>
</div>
<p>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.</p>
<dl class="block"><dt class="dlterm"><strong>Parameter</strong>: <em>directory-filename </em></dt>
<dd><ul><li>The <em>directory-filename</em> parameter defines the directory path and
filename for the file that contains configuration information that describes
how the ASF Tomcat module forwards requests to the servlet engine.</li>
</ul>
</dd>
</dl>
<p>There is no default; this directive must be specified or ASF Tomcat will
not function. The typical file name is workers.properties. </p>
<p>This directive supports both the Root and QOpenSys file systems.</p>
</div>
</div>
</body>
</html>