bottleneck testcase based on rubbos
[bottlenecks.git] / rubbos / app / tomcat-connectors-1.2.32-src / docs / reference / printer / apache.html
1 <html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>The Apache Tomcat Connector - Reference Guide - Configuring Apache</title><meta name="author" value="Mladen Turk"><meta name="email" value="mturk@apache.org"><link href="../../style.css" type="text/css" rel="stylesheet"></head><body bgcolor="#ffffff" text="#000000" link="#525D76" alink="#525D76" vlink="#525D76"><table border="0" width="100%" cellspacing="4"><!--PAGE HEADER--><tr><td colspan="2"><!--TOMCAT LOGO--><a href="http://tomcat.apache.org/"><img src="../../images/tomcat.gif" align="left" alt="Apache Tomcat" border="0"></a><!--APACHE LOGO--><a href="http://www.apache.org/"><img src="http://www.apache.org/images/asf-logo.gif" align="right" alt="Apache Logo" border="0"></a></td></tr><!--HEADER SEPARATOR--><tr><td colspan="2"><hr noshade size="1"></td></tr><tr><!--RIGHT SIDE MAIN BODY--><td width="80%" valign="top" align="left"><table border="0" width="100%" cellspacing="4"><tr><td align="left" valign="top"><h1>The Apache Tomcat Connector - Reference Guide</h1><h2>Configuring Apache</h2></td><td align="right" valign="top" nowrap="true"><img src="../../images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Configuration Directives"><strong>Configuration Directives</strong></a></font></td></tr><tr><td><blockquote>
2 <p>
3 Most of the directives are allowed once in the global part of the Apache httpd
4 configuration and once in every &lt;VirtualHost&gt; elements. Exceptions from this rule are
5 explicitly listed in the table below.
6 </p>
7 <p>
8 Most values are inherited from the main server to the virtual hosts.
9 Since version 1.2.20 they can be overwritten in the virtual hosts.
10 Exceptions from this rule are again explicitly listed in the table below.
11 See especially JkMountCopy.
12 </p>
13 <p><font color="#ff0000">
14 Warning: If Apache httpd and Tomcat are configured to serve content from
15 the same filing system location then care must be taken to ensure that httpd is
16 not able to serve inappropriate content such as the contents of the WEB-INF
17 directory or JSP source code.
18 </font></p>
19 <p>
20 This could occur if the httpd DocumentRoot
21 overlaps with a Tomcat Host's appBase or the docBase of any Context. It could
22 also occur when using the httpd Alias directive with a Tomcat Host's appBase or
23 the docBase of any Context.
24 </p>
25 <p>
26 Here are the all directives supported by Apache:
27 </p>
28 <table border="1" cellpadding="5"><tr><th width="20%" bgcolor="#023264"><font color="#ffffff">Directive</font></th><th width="80%" bgcolor="#023264"><font color="#ffffff">Description</font></th></tr><tr><td align="left" valign="center"><code>JkWorkersFile</code></td><td align="left" valign="center"><p>
29 The name of a worker file for the Tomcat servlet containers.
30 <br>
31 This directive is only allowed once. It must be put into
32 the global part of the configuration.
33 <br>
34 If you don't use the JkWorkerProperty directives, then you must
35 define your workers with a valid JkWorkersFile. There is no default
36 value.
37 </p></td></tr><tr><td align="left" valign="center"><code>JkWorkerProperty</code></td><td align="left" valign="center"><p>
38 Enables setting worker properties inside Apache configuration file.
39 The syntax is the same as in the JkWorkersFile (usually workers.properties).
40 Simply prefix each line with "JkWorkerProperty" to put it directly into
41 the Apache httpd config files.
42 <br>
43 This directive is allowed multiple times.
44 It must be put into the global part of the configuration.
45 <br>
46 If you don't use the JkWorkerProperty directives, then you must
47 define your workers with a valid JkWorkersFile. There is no default
48 value.
49 <br>
50 This directive is available in jk1.2.7 version and later.
51 </p></td></tr><tr><td align="left" valign="center"><code>JkShmFile</code></td><td align="left" valign="center"><p>
52 Shared memory file name. Used only on unix platforms.
53 The shm file is used by balancer and status workers.
54 <br>
55 This directive is only allowed once. It must be put into
56 the global part of the configuration.
57 <br>
58 The default value is logs/jk-runtime-status.
59 It is highly recommended that the shm file be placed on a local
60 drive and not an NFS share.
61 </p>
62 <p>
63 The shared memory contains configuration and runtime information for load balancer
64 workers and their members. It is need in order that all apache children
65 <ul>
66 <li>share the same status information for load balancing members (OK, ERROR, ...),</li>
67 <li>share the information about load taken by the individual workers,</li>
68 <li>share the information for the parts of the configuration, which are changeable
69 during runtime by status workers.</li>
70 </ul>
71 </p>
72 </td></tr><tr><td align="left" valign="center"><code>JkShmSize</code></td><td align="left" valign="center"><p>
73 Size of the shared memory file name.
74 <br>
75 This directive is only allowed once. It must be put into
76 the global part of the configuration.
77 <br>
78 The default value depends on the platform. It is usually less than 64KB.
79 </p></td></tr><tr><td align="left" valign="center"><code>JkMountFile</code></td><td align="left" valign="center"><p>
80 File containing multiple mappings from a context to a Tomcat worker.
81 It is usually called uriworkermap.properties.
82 <br>
83 For inheritance rules, see: JkMountCopy.
84 <br>
85 There is no default value.
86 </p></td></tr><tr><td align="left" valign="center"><code>JkMountFileReload</code></td><td align="left" valign="center"><p>
87 This directive configures the reload check interval in seconds.
88 The JkMountFile is checked periodically for changes.
89 A changed file gets reloaded automatically. If you set
90 this directive to "0", reload checking is turned off.
91 <br>
92 The default value is 60 seconds.
93 <br>
94 This directive has been added in version 1.2.20 of mod_jk.
95 </p></td></tr><tr><td align="left" valign="center"><code>JkMount</code></td><td align="left" valign="center"><p>
96 A mount point from a context to a Tomcat worker.
97 <br>
98 This directive is allowed multiple times.
99 It is allowed in the global configuration and in VirtualHost.
100 You can also use it inside Location with a different syntax.
101 Inside Location, one omits the first argument (path),
102 which gets inherited from the Location.
103 <br>
104 By default JkMount entries are not inherited from the global
105 server to other VirtualHosts or between VirtualHosts.
106 For the complete inheritance rules, see: JkMountCopy.
107 </p></td></tr><tr><td align="left" valign="center"><code>JkUnMount</code></td><td align="left" valign="center"><p>
108 An exclusion mount point from a context to a Tomcat worker.
109 All exclusion mounts are checked after mapping a request
110 to a tomcat worker. If the request maps also to an exclusion,
111 it will not be forwarded to tomcat, and instead be served locally.
112 <br>
113 This directive is allowed multiple times.
114 It is allowed in the global configuration and in VirtualHost.
115 You can also use it inside Location with a different syntax.
116 Inside Location, one omits the first argument (path),
117 which gets inherited from the Location.
118 For inheritance rules, see: JkMountCopy.
119 <br>
120 This directive is available in jk1.2.7 version and later.
121 </p></td></tr><tr><td align="left" valign="center"><code>JkAutoAlias</code></td><td align="left" valign="center"><p>
122 Automatically Alias webapp context directories into the Apache
123 document space.
124 <br>
125 Care should be taken to ensure that only static content is served via httpd as a
126 result of using this directive. Any static content served by httpd will bypass any
127 security constraints defined in the application's web.xml.
128 <br>
129 For inheritance rules, see: JkMountCopy.
130 <br>
131 There is no default value.
132 </p></td></tr><tr><td align="left" valign="center"><code>JkMountCopy</code></td><td align="left" valign="center"><p>
133 If this directive is set to "On" in some virtual server,
134 the mounts from the global server will be copied to this
135 virtual server, more precisely all mounts defined by JkMount
136 or JkUnMount. The Mounts defined by JkMountFile and JkAutoAlias
137 will only be inherited, if the VirtualHost does not define
138 it's own JkMountFile or JkAutoAlias.
139 <br>
140 If you want all vhost to inherit mounts from the main server,
141 you can set JkMountCopy to 'All' in the main server.
142 <br>
143 This directive is only allowed inside VirtualHost (with value "On")
144 and in the global server (with value "All").
145 <br>
146 The default is Off, so no mounts will be inherited from the global
147 server to any VirtualHost.
148 <br>
149 Starting with version 1.2.26 you can also set it to "All" in the
150 global virtual server. This will switch the default to On.
151 </p></td></tr><tr><td align="left" valign="center"><code>JkWorkerIndicator</code></td><td align="left" valign="center"><p>
152 Name of the Apache environment variable that can be used to set worker names
153 in combination with SetHandler jakarta-servlet.
154 <br>
155 This directive is only allowed once per virtual server.
156 It is allowed in the global configuration and in VirtualHost.
157 <br>
158 The default value is JK_WORKER_NAME.
159 </p></td></tr><tr><td align="left" valign="center"><code>JkWatchdogInterval</code></td><td align="left" valign="center"><p>
160 This directive configures the watchdog thread interval in seconds.
161 The workers are maintained periodically by a background thread
162 running periodically every watchdog_interval seconds. Worker maintenance
163 checks for idle connections, corrects load status and is able
164 to detect backend health status.
165 <br>
166 The maintenance only happens, if since the last maintenance at
167 least <a href="workers.html"><b class="code">worker.maintain</b></a>
168 seconds have passed. So setting the JkWatchdogInterval
169 much smaller than <b class="code">worker.maintain</b> is not useful.
170 <br>
171 The default value is 0 seconds, meaning the watchdog thread
172 will not be created, and the maintenance is done in combination
173 with normal requests instead.
174 <br>
175 This directive is only allowed once. It must be put into
176 the global part of the configuration.
177 <br>
178 This directive has been added in version 1.2.27 of mod_jk.
179 It is available only for httpd 2.x and above using APR libraries
180 including thread support.
181 </p></td></tr><tr><td align="left" valign="center"><code>JkLogFile</code></td><td align="left" valign="center"><p>
182 Full or server relative path to the Tomcat Connector module log file.
183 It will also work with pipe, by using a value of the form "| ...".
184 <br>
185 The default value is logs/mod_jk.log.
186 <br>
187 Pipes are supported for Apache 1.3 only since version 1.2.16.
188 The default value exists only since version 1.2.20.
189 </p></td></tr><tr><td align="left" valign="center"><code>JkLogLevel</code></td><td align="left" valign="center"><p>
190 The Tomcat Connector module log level, can be debug, info, warn
191 error or trace.
192 <br>
193 The default value is info.
194 </p></td></tr><tr><td align="left" valign="center"><code>JkLogStampFormat</code></td><td align="left" valign="center"><p>
195 The Tomcat Connector module <b>date</b> log format, using an
196 extended strftime syntax.
197 This format will be used for the time stamps in the JkLogFile.
198 The maximum length of the format is 63 characters.
199 <br>
200 Starting with version 1.2.24 of mod_jk you can also use %Q
201 for adding milliseconds to the log and %q for microseconds. 
202 These conversion specifiers are an extension to strftime.
203 They will only work on platforms with a gettimeofday() function.
204 You can use %Q and %q only once in the pattern and also not both
205 together in the same pattern.
206 <br>
207 The default value is "[%a %b %d %H:%M:%S %Y] " and beginning
208 with version 1.2.24 on platforms with a gettimeofday()
209 function it is "[%a %b %d %H:%M:%S.%Q %Y] ".
210 </p></td></tr><tr><td align="left" valign="center"><code>JkRequestLogFormat</code></td><td align="left" valign="center"><p>
211 Request log format string. See detailed description below.
212 <br>
213 There is no default value. Without defining a value, the request logging
214 is turned off.
215 </p></td></tr><tr><td align="left" valign="center"><code>JkExtractSSL</code></td><td align="left" valign="center"><p>
216 Turns on SSL processing and information gathering by mod_jk
217 <br>
218 The default value is On.
219 <br>
220 In order to make SSL data available for mod_jk in Apache, you need to
221 set <b class="code">SSLOptions +StdEnvVars</b>. For the certificate information you also need
222 to add <b class="code">SSLOptions +ExportCertData</b>.
223 </p>
224 <p>
225   Specifically, mod_jk will export the following environment variables from
226   Apache httpd to Tomcat under these request attributes as per the
227   Servlet Specification 3.0, section 3.8:
228 </p>
229 <table>
230   <tr><th>Env Var</th><th>Request Attribute Name</th><th>Type</th><th>Example</th></tr>
231   <tr>
232     <td>SSL_CIPHER<br>(or <b class="code">JkKEYSIZEIndicator</b>)</td>
233     <td>javax.servlet.request.cipher_suite</td>
234     <td>java.lang.String</td>
235     <td>DHE-RSA-AES256-SHA</td>
236   </tr>
237   <tr>
238     <td>SSL_CIPHER_USEKEYSIZE<br>(or <b class="code">JkKEYSIZEIndicator</b>)</td>
239     <td>javax.servlet.request.key_size</td>
240     <td>java.lang.Integer</td>
241     <td>256</td>
242   </tr>
243   <tr>
244     <td>SSL_SESSION_ID<br>(or <b class="code">JkSESSIONIndicator</b>)</td>
245     <td>javax.servlet.request.ssl_session</td>
246     <td>java.lang.String</td>
247     <td>905...32E (a hex string)</td>
248   </tr>
249   <tr>
250     <td>SSL_CLIENT_CERT_CHAIN_<i>n</i><br>(or <b class="code">JkCERTCHAINPrefix</b><i>n</i>)</td>
251     <td>javax.servlet.request.X509Certificate</td>
252     <td>java.security.X509Certificate[]</td>
253     <td>(A chain of certs in ascending order of trust, the first one being
254         ths client's certificate, the second being the signer of that
255         certificate, and so on)</td>
256   </tr>
257 </table>
258 <p>
259   For all other SSL-related variables, use <b class="code">JkEnvVar</b> for each
260   variable you want. Please note that, like <b class="code">JkEnvVar</b>, these
261   variables are available from the request <i><b>attributes</b></i>, not as
262   environment variables or as request headers.
263 </p>
264 </td></tr><tr><td align="left" valign="center"><code>JkHTTPSIndicator</code></td><td align="left" valign="center"><p>
265 Name of the Apache environment variable that contains SSL indication.
266 <br>
267 The default value is "HTTPS".
268 </p></td></tr><tr><td align="left" valign="center"><code>JkCERTSIndicator</code></td><td align="left" valign="center"><p>
269 Name of the Apache environment variable that contains SSL client certificates.
270 <br>
271 The default value is "SSL_CLIENT_CERT".
272 </p></td></tr><tr><td align="left" valign="center"><code>JkCIPHERIndicator</code></td><td align="left" valign="center"><p>
273 Name of the Apache environment variable that contains SSL client cipher.
274 <br>
275 The default value is "SSL_CIPHER".
276 </p></td></tr><tr><td align="left" valign="center"><code>JkCERTCHAINPrefix</code></td><td align="left" valign="center"><p>
277 Name of the Apache environment (prefix) that contains SSL client chain certificates.
278 <br>
279 The default value is "SSL_CLIENT_CERT_CHAIN_".
280 </p></td></tr><tr><td align="left" valign="center"><code>JkSESSIONIndicator</code></td><td align="left" valign="center"><p>
281 Name of the Apache environment variable that contains SSL session.
282 <br>
283 The default value is "SSL_SESSION_ID".
284 </p></td></tr><tr><td align="left" valign="center"><code>JkKEYSIZEIndicator</code></td><td align="left" valign="center"><p>
285 Name of the Apache environment variable that contains SSL key size in use.
286 <br>
287 The default value is "SSL_CIPHER_USEKEYSIZE".
288 </p></td></tr><tr><td align="left" valign="center"><code>JkLocalNameIndicator</code></td><td align="left" valign="center"><p>
289 Name of the Apache environment variable which can be used to overwrite
290 the forwarded local name.
291 Use this only if you need to adjust the data (see the
292 <a href="../../generic_howto/proxy.html">proxy</a> documentation).
293 <br>
294 The default value is "JK_LOCAL_NAME".
295 <br>
296 This directive has been added in version 1.2.28 of mod_jk.
297 </p></td></tr><tr><td align="left" valign="center"><code>JkLocalPortIndicator</code></td><td align="left" valign="center"><p>
298 Name of the Apache environment variable which can be used to overwrite
299 the forwarded local port.
300 Use this only if you need to adjust the data (see the
301 <a href="../../generic_howto/proxy.html">proxy</a> documentation).
302 <br>
303 The default value is "JK_LOCAL_PORT".
304 <br>
305 This directive has been added in version 1.2.28 of mod_jk.
306 </p></td></tr><tr><td align="left" valign="center"><code>JkRemoteHostIndicator</code></td><td align="left" valign="center"><p>
307 Name of the Apache environment variable which can be used to overwrite
308 the forwarded remote (client) host name.
309 Use this only if you need to adjust the data (see the
310 <a href="../../generic_howto/proxy.html">proxy</a> documentation).
311 <br>
312 The default value is "JK_REMOTE_HOST".
313 <br>
314 This directive has been added in version 1.2.28 of mod_jk.
315 </p></td></tr><tr><td align="left" valign="center"><code>JkRemoteAddrIndicator</code></td><td align="left" valign="center"><p>
316 Name of the Apache environment variable which can be used to overwrite
317 the forwarded remote (client) IP address.
318 Use this only if you need to adjust the data (see the
319 <a href="../../generic_howto/proxy.html">proxy</a> documentation).
320 <br>
321 The default value is "JK_REMOTE_ADDR".
322 <br>
323 This directive has been added in version 1.2.28 of mod_jk.
324 </p></td></tr><tr><td align="left" valign="center"><code>JkRemotePortIndicator</code></td><td align="left" valign="center"><p>
325 Name of the Apache environment variable which can be used to overwrite
326 the forwarded remote (client) IP address.
327 Use this only if you need to adjust the data (see the
328 <a href="../../generic_howto/proxy.html">proxy</a> documentation).
329 <br>
330 The default value is "JK_REMOTE_PORT".
331 <br>
332 This directive has been added in version 1.2.32 of mod_jk.
333 </p></td></tr><tr><td align="left" valign="center"><code>JkRemoteUserIndicator</code></td><td align="left" valign="center"><p>
334 Name of the Apache environment variable which can be used to overwrite
335 the forwarded user name.
336 Use this only if you need to adjust the data (see the
337 <a href="../../generic_howto/proxy.html">proxy</a> documentation).
338 <br>
339 The default value is "JK_REMOTE_USER".
340 <br>
341 This directive has been added in version 1.2.28 of mod_jk.
342 </p></td></tr><tr><td align="left" valign="center"><code>JkAuthTypeIndicator</code></td><td align="left" valign="center"><p>
343 Name of the Apache environment variable which can be used to overwrite
344 the forwarded authentication type.
345 Use this only if you need to adjust the data (see the
346 <a href="../../generic_howto/proxy.html">proxy</a> documentation).
347 <br>
348 The default value is "JK_AUTH_TYPE".
349 <br>
350 This directive has been added in version 1.2.28 of mod_jk.
351 </p></td></tr><tr><td align="left" valign="center"><code>JkOptions</code></td><td align="left" valign="center"><p>
352 Set one of more options to configure the mod_jk module. See below for
353 details about this directive.
354 <br>
355 This directive can be used multiple times per virtual server.
356 <br>
357 The default value is "ForwardURIProxy" since version 1.2.24.
358 It was "ForwardURICompatUnparsed" in version 1.2.23 and
359 "ForwardURICompat" until version 1.2.22.
360 </p></td></tr><tr><td align="left" valign="center"><code>JkEnvVar</code></td><td align="left" valign="center"><p>
361 Adds a name and an optional default value of environment variable
362 that should be sent to servlet-engine as a request attribute.
363 If the default value is not given explicitly, the variable
364 will only be send, if it is set during runtime.
365 <br>
366 The default is empty, so no additional variables will be sent.
367 <br>
368 This directive can be used multiple times per virtual server.
369 The settings will be merged between the global server and any
370 virtual server.
371 <br>
372 You can retrieve the variables on Tomcat as request attributes
373 via request.getAttribute(attributeName). Note that the variables
374 send via JkEnvVar will not be listed in request.getAttributeNames().
375 <br>
376 Empty default values are supported since version 1.2.20.
377 Not sending variables with empty defaults and empty runtime value
378 has been introduced in version 1.2.21.
379 </p></td></tr><tr><td align="left" valign="center"><code>JkStripSession</code></td><td align="left" valign="center"><p>
380 If this directive is set to On in some virtual server,
381 the session IDs <b class="code">;jsessionid=...</b> will be
382 removed for non matched URLs.
383 <br>
384 This directive is only allowed inside VirtualHost.
385 <br>
386 The default is Off.
387 <br>
388 This directive has been introduced in version 1.2.21.
389 <br>With version 1.2.27 and later this directive can have optional
390 session ID identifier. If not specified it defaults to
391 <b class="code">;jsessionid</b>.
392 </p>
393 </td></tr></table>
394 </blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Configuration Directives Types"><strong>Configuration Directives Types</strong></a></font></td></tr><tr><td><blockquote>
395 <p>
396 We'll discuss here the mod_jk directive types.
397 </p>
398
399 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Define workers"><strong>Define workers</strong></a></font></td></tr><tr><td><blockquote>
400 <p>
401 <b>JkWorkersFile</b> specify the location where mod_jk will find the workers definitions.
402 Take a look at <a href="workers.html">Workers documentation</a> for detailed description.
403
404 <div class="example"><pre>
405   JkWorkersFile     /etc/httpd/conf/workers.properties
406 </pre></div>
407
408 <br>
409 <br>
410 </p>
411
412 </blockquote></td></tr></table>
413
414 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Logging"><strong>Logging</strong></a></font></td></tr><tr><td><blockquote>
415 <p>
416 <b>JkLogFile</b> specify the location where mod_jk is going to place its log file.
417 </p>
418
419 <div class="example"><pre>
420   JkLogFile     /var/log/httpd/mod_jk.log
421 </pre></div>
422
423 <p>
424 Since JK 1.2.3 for Apache 2.x and JK 1.2.16 for Apache 1.3 this can also
425 be used for piped logging:
426 </p>
427
428 <div class="example"><pre>
429   JkLogFile     "|/usr/bin/rotatelogs /var/log/httpd/mod_jk.log 86400"
430 </pre></div>
431
432 <p>
433 <b>JkLogLevel</b>
434 set the log level between :
435 </p>
436
437 <ul>
438 <li>
439 <b>info</b> log will contain standard mod_jk activity (default).
440 </li>
441 <li>
442 <b>warn</b> log will contain non fatal error reports.
443 </li>
444 <li>
445 <b>error</b> log will contain also error reports.
446 </li>
447 <li>
448 <b>debug</b> log will contain all information on mod_jk activity
449 </li>
450 <li>
451 <b>trace</b> log will contain all tracing information on mod_jk activity
452 </li>
453 </ul>
454
455 <div class="example"><pre>  
456   JkLogLevel    info
457 </pre></div>
458
459 <p>
460 <b class="code">info</b> should be your default selection for normal operations.
461 <br>
462 <br>
463 </p>
464
465 <p>
466 <b>JkLogStampFormat</b> will configure the date/time format found on mod_jk log file. 
467 Using the strftime() format string it's set by<br>
468 default to <b>"[%a %b %d %H:%M:%S %Y]"</b>
469 </p>
470
471 <div class="example"><pre>
472   JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
473 </pre></div>
474
475 <p>
476 <br>
477 <br>
478 </p>
479
480 <p>
481 <b>JkRequestLogFormat</b> will configure the format of mod_jk individual request logging. 
482 Request logging is configured and enabled on a per virtual host basis. 
483 To enable request logging for a virtual host just add a JkRequestLogFormat config. 
484 The syntax of the format string is similar to the Apache LogFormat command, 
485 here is a list of the available request log format options:
486 </p>
487
488 <p>
489 <table border="1" cellpadding="5"><tr><th width="20%" bgcolor="#023264"><font color="#ffffff">Options</font></th><th width="80%" bgcolor="#023264"><font color="#ffffff">Description</font></th></tr><tr><td align="left" valign="center"><code>%b</code></td><td align="left" valign="center">Bytes sent, excluding HTTP headers (CLF format)</td></tr><tr><td align="left" valign="center"><code>%B</code></td><td align="left" valign="center">Bytes sent, excluding HTTP headers</td></tr><tr><td align="left" valign="center"><code>%H</code></td><td align="left" valign="center">The request protocol</td></tr><tr><td align="left" valign="center"><code>%m</code></td><td align="left" valign="center">The request method</td></tr><tr><td align="left" valign="center"><code>%p</code></td><td align="left" valign="center">The canonical Port of the server serving the request</td></tr><tr><td align="left" valign="center"><code>%q</code></td><td align="left" valign="center">The query string (prepended with a ? if a query string exists, otherwise an empty string)</td></tr><tr><td align="left" valign="center"><code>%r</code></td><td align="left" valign="center">First line of request</td></tr><tr><td align="left" valign="center"><code>%s</code></td><td align="left" valign="center">Request HTTP status code</td></tr><tr><td align="left" valign="center"><code>%T</code></td><td align="left" valign="center">Request duration, elapsed time to handle request in seconds '.' micro seconds</td></tr><tr><td align="left" valign="center"><code>%U</code></td><td align="left" valign="center">The URL path requested, not including any query string.</td></tr><tr><td align="left" valign="center"><code>%v</code></td><td align="left" valign="center">The canonical ServerName of the server serving the request</td></tr><tr><td align="left" valign="center"><code>%V</code></td><td align="left" valign="center">The server name according to the UseCanonicalName setting</td></tr><tr><td align="left" valign="center"><code>%w</code></td><td align="left" valign="center">Tomcat worker name</td></tr><tr><td align="left" valign="center"><code>%R</code></td><td align="left" valign="center">Real worker name</td></tr></table>
490
491 <div class="example"><pre>
492   JkRequestLogFormat     "%w %V %T"
493 </pre></div>
494
495 <br>
496 <br>
497 </p>
498
499 <p>
500 You can also log mod_jk information using the Apache standard module <b>mod_log_config</b>.
501 The module sets several notes in the Apache httpd notes table.
502 Most of them are are only useful in combination with a load balancer worker.
503 </p>
504
505 <p>
506 <table border="1" cellpadding="5"><tr><th width="20%" bgcolor="#023264"><font color="#ffffff">Note</font></th><th width="80%" bgcolor="#023264"><font color="#ffffff">Description</font></th></tr><tr><td align="left" valign="center"><code>JK_WORKER_NAME</code></td><td align="left" valign="center">Name of the worker selected by the URI mapping</td></tr><tr><td align="left" valign="center"><code>JK_WORKER_TYPE</code></td><td align="left" valign="center">Type of the worker selected by the URI mapping</td></tr><tr><td align="left" valign="center"><code>JK_WORKER_ROUTE</code></td><td align="left" valign="center">Actual worker name selected by the URI mapping (usually a member of the load balancer).<br>
507                                                          Before version 1.2.26 only available if JkRequestLogFormat is set.</td></tr><tr><td align="left" valign="center"><code>JK_REQUEST_DURATION</code></td><td align="left" valign="center">Request duration in seconds and microseconds.<br>
508                                                          Before version 1.2.26 only available if JkRequestLogFormat is set.</td></tr><tr><td align="left" valign="center"><code>JK_LB_FIRST_NAME</code></td><td align="left" valign="center">Load-Balancer: Name of the first worker tried</td></tr><tr><td align="left" valign="center"><code>JK_LB_FIRST_TYPE</code></td><td align="left" valign="center">Load-Balancer: Type of the first worker tried</td></tr><tr><td align="left" valign="center"><code>JK_LB_FIRST_ACCESSED</code></td><td align="left" valign="center">Load-Balancer: Access count for the first worker tried</td></tr><tr><td align="left" valign="center"><code>JK_LB_FIRST_READ</code></td><td align="left" valign="center">Load-Balancer: Bytes read for the first worker tried</td></tr><tr><td align="left" valign="center"><code>JK_LB_FIRST_TRANSFERRED</code></td><td align="left" valign="center">Load-Balancer: Bytes transferred for the first worker tried</td></tr><tr><td align="left" valign="center"><code>JK_LB_FIRST_ERRORS</code></td><td align="left" valign="center">Load-Balancer: Error count for the first worker tried</td></tr><tr><td align="left" valign="center"><code>JK_LB_FIRST_BUSY</code></td><td align="left" valign="center">Load-Balancer: Busy count for the first worker tried</td></tr><tr><td align="left" valign="center"><code>JK_LB_FIRST_ACTIVATION</code></td><td align="left" valign="center">Load-Balancer: Activation state for the first worker tried</td></tr><tr><td align="left" valign="center"><code>JK_LB_FIRST_STATE</code></td><td align="left" valign="center">Load-Balancer: Error state for the first worker tried</td></tr><tr><td align="left" valign="center"><code>JK_LB_LAST_NAME</code></td><td align="left" valign="center">Load-Balancer: Name of the last worker tried</td></tr><tr><td align="left" valign="center"><code>JK_LB_LAST_TYPE</code></td><td align="left" valign="center">Load-Balancer: Type of the last worker tried</td></tr><tr><td align="left" valign="center"><code>JK_LB_LAST_ACCESSED</code></td><td align="left" valign="center">Load-Balancer: Access count for the last worker tried</td></tr><tr><td align="left" valign="center"><code>JK_LB_LAST_READ</code></td><td align="left" valign="center">Load-Balancer: Bytes read for the last worker tried</td></tr><tr><td align="left" valign="center"><code>JK_LB_LAST_TRANSFERRED</code></td><td align="left" valign="center">Load-Balancer: Bytes transferred for the last worker tried</td></tr><tr><td align="left" valign="center"><code>JK_LB_LAST_ERRORS</code></td><td align="left" valign="center">Load-Balancer: Error count for the last worker tried</td></tr><tr><td align="left" valign="center"><code>JK_LB_LAST_BUSY</code></td><td align="left" valign="center">Load-Balancer: Busy count for the last worker tried</td></tr><tr><td align="left" valign="center"><code>JK_LB_LAST_ACTIVATION</code></td><td align="left" valign="center">Load-Balancer: Activation state for the last worker tried</td></tr><tr><td align="left" valign="center"><code>JK_LB_LAST_STATE</code></td><td align="left" valign="center">Load-Balancer: Error state for the last worker tried</td></tr></table>
509
510 <div class="example"><pre>
511   LogFormat     "%h %l %u %t \"%r\" %&gt;s %b %{JK_WORKER_NAME}n %{JK_LB_FIRST_NAME}n \
512                  %{JK_LB_FIRST_BUSY}n %{JK_LB_LAST_NAME}n %{JK_LB_LAST_BUSY}n" mod_jk_log
513   CustomLog     logs/access_log     mod_jk_log
514 </pre></div>
515
516 <br>
517 <br>
518 </p>
519
520 </blockquote></td></tr></table>
521
522 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Forwarding"><strong>Forwarding</strong></a></font></td></tr><tr><td><blockquote>
523 <p>
524 The directive JkOptions allow you to set many forwarding options which will enable (+)
525 or disable (-) following option. Without any leading signs, options will be enabled.
526 <br>
527 <br>
528 </p>
529
530 <p>
531 The four following options <b>+ForwardURIxxx</b> are mutually exclusive.
532 Exactly one of them is required, a negative sign prefix is not allowed with them.
533 The default value is "ForwardURIProxy" since version 1.2.24.
534 It was "ForwardURICompatUnparsed" in version 1.2.23 and
535 "ForwardURICompat" until version 1.2.22.
536 You can turn the default off by switching on one of the other two options.
537 You should leave this at it's default value, unless you have a very good
538 reason to change it.
539 <br>
540 <br>
541 </p>
542
543 <p>
544 All options are inherited from the global server to virtual hosts.
545 Options that support enabling (plus options) and disabling (minus options),
546 are inherited in the following way:
547 <br>
548 <br>
549 options(vhost) = plus_options(global) - minus_options(global) + plus_options(vhost) - minus_options(vhost)
550 <br>
551 <br>
552 </p>
553
554 <p>
555 Using JkOptions <b>ForwardURIProxy</b>, the forwarded URI
556 will be partially reencoded after processing inside Apache httpd and
557 before forwarding to Tomcat. This will be compatible with local
558 URL manipulation by mod_rewrite and with URL encoded session ids.
559
560 <div class="example"><pre>
561   JkOptions     +ForwardURIProxy
562 </pre></div>
563
564 <br>
565 <br>
566 </p>
567
568 <p>
569 Using JkOptions <b>ForwardURICompatUnparsed</b>, the forwarded URI
570 will be unparsed. It's spec compliant and secure.
571 It will always forward the original request URI, so rewriting
572 URIs with mod_rewrite and then forwarding the rewritten URI
573 will not work.
574
575 <div class="example"><pre>
576   JkOptions     +ForwardURICompatUnparsed
577 </pre></div>
578
579 <br>
580 <br>
581 </p>
582
583 <p>
584 Using JkOptions <b>ForwardURICompat</b>, the forwarded URI will
585 be decoded by Apache httpd. Encoded characters will be decoded and
586 explicit path components like ".." will already be resolved.
587 This is less spec compliant and is <b>not safe</b> if you are using
588 prefix JkMount. This option will allow to rewrite URIs with
589 mod_rewrite before forwarding.
590
591 <div class="example"><pre>
592   JkOptions     +ForwardURICompat
593 </pre></div>
594
595 <br>
596 <br>
597 </p>
598
599 <p>
600 Using JkOptions <b>ForwardURIEscaped</b>, the forwarded URI will
601 be the encoded form of the URI used by ForwardURICompat.
602 Explicit path components like ".." will already be resolved.
603 This will not work in combination with URL encoded session IDs,
604 but it will allow to rewrite URIs with mod_rewrite before forwarding.
605
606 <div class="example"><pre>
607   JkOptions     +ForwardURIEscaped
608 </pre></div>
609
610 <br>
611 <br>
612 </p>
613
614 <p>
615 JkOptions <b>RejectUnsafeURI</b> will block all
616 URLs, which contain percent signs '%' or backslashes '\'
617 after decoding.
618 <br>
619 <br>
620 </p>
621 <p>
622 Most web apps do not use such URLs. Using the option RejectUnsafeURI, you
623 can block several well known URL encoding attacks. By default, this option
624 is not set.
625 </p>
626 <p>
627 You can also realise such a check with mod_rewrite, which is more powerful
628 but also slightly more complicated.
629
630 <div class="example"><pre>  
631   JkOptions     +RejectUnsafeURI
632 </pre></div>
633
634 <br>
635 <br>
636 </p>
637
638 <p>
639 JkOptions <b>ForwardDirectories</b> is used in conjunction with <b>DirectoryIndex</b>
640 directive of Apache web server. As such mod_dir should be available to Apache,
641 statically or dynamically (DSO)
642 <br>
643 <br>
644 </p>
645
646 <p>
647 When DirectoryIndex is configured, Apache will create sub-requests for
648 each of the local-url's specified in the directive, to determine if there is a
649 local file that matches (this is done by stat-ing the file).
650 </p>
651
652 <p>
653 If ForwardDirectories is set to false (default) and Apache doesn't find any
654 files that match, Apache will serve the content of the directory (if directive
655 Options specifies Indexes for that directory) or a <b class="code">403 Forbidden</b> response (if
656 directive Options doesn't specify Indexes for that directory).
657 </p>
658
659 <p>
660 If ForwardDirectories is set to true and Apache doesn't find any files that
661 match, the request will be forwarded to Tomcat for resolution. This is used in
662 cases when Apache cannot see the index files on the file system for various
663 reasons: Tomcat is running on a different machine, the JSP file has been
664 precompiled etc. 
665 </p>
666
667 <p>Note that locally visible files will take precedence over the
668 ones visible only to Tomcat (i.e. if Apache can see the file, that's the one
669 that's going to get served). This is important if there is more then one type of
670 file that Tomcat normally serves - for instance Velocity pages and JSP pages.
671
672 <div class="example"><pre>  
673   JkOptions     +ForwardDirectories
674 </pre></div>
675 <br>
676 <br>
677 </p>
678
679 <p>
680 JkOptions <b>ForwardLocalAddress</b>, you ask mod_jk to send the local address,
681 of the Apache web server instead remote client address. This can be used by
682 Tomcat remote address valve for allowing connections only from registered Apache
683 web servers.
684
685 <div class="example"><pre>  
686   JkOptions     +ForwardLocalAddress
687 </pre></div>
688
689 <br>
690 <br>
691 </p>
692
693 <p>
694 JkOptions <b>FlushPackets</b>, you ask mod_jk to flush Apache's connection
695 buffer after each AJP packet chunk received from Tomcat. This option can have
696 a strong performance penalty for Apache and Tomcat as writes are performed
697 more often than would normally be required (ie: at the end of each
698 response).
699
700 <div class="example"><pre>  
701   JkOptions     +FlushPackets
702 </pre></div>
703
704 <br>
705 <br>
706 </p>
707
708 <p>
709 JkOptions <b>FlushHeader</b>, you ask mod_jk to flush Apache's connection
710 buffer after the response headers have been  received from Tomcat.
711
712 <div class="example"><pre>  
713   JkOptions     +FlushHeader
714 </pre></div>
715
716 <br>
717 <br>
718 </p>
719
720 <p>
721 JkOptions <b>DisableReuse</b>, you ask mod_jk to close connections immediately
722 after their use. Normally mod_jk uses persistent connections and pools idle
723 connections to reuse them, when new requests have to be sent to Tomcat.
724 </p>
725
726 <p>
727 Using this option will have a strong performance penalty for Apache and Tomcat.
728 Use this only as a last resort in case of unfixable network problems.
729 If a firewall between Apache and Tomcat silently kills idle connections,
730 try to use the worker attribute socket_keepalive in combination with an appropriate
731 TCP keepalive value in your OS.
732
733 <div class="example"><pre>  
734   JkOptions     +DisableReuse
735 </pre></div>
736
737 <br>
738 <br>
739 </p>
740
741 <p>
742 JkOptions <b>ForwardKeySize</b>,  you ask mod_jk, when using ajp13, to forward also the SSL Key Size  as 
743 required by Servlet API 2.3.
744 This flag shouldn't be set when servlet engine is Tomcat 3.2.x (on by default).
745
746 <div class="example"><pre>  
747   JkOptions     +ForwardKeySize
748 </pre></div>
749
750 <br>
751 <br>
752 </p>
753
754 <p>
755 JkOptions <b>ForwardSSLCertChain</b>,  you ask mod_jk, when using ajp13,
756 to forward SSL certificate chain (off by default).
757 Mod_jk only passes the <b class="code">SSL_CLIENT_CERT</b> to the AJP connector. This is not a
758 problem with self-signed certificates or certificates directly signed by the
759 root CA certificate. However, there's a large number of certificates signed by
760 an intermediate CA certificate, where this is a significant problem: A servlet
761 will not have the possibility to validate the client certificate on its own. The
762 bug would be fixed by passing on the <b class="code">SSL_CLIENT_CERT_CHAIN</b> to Tomcat via the AJP connector.
763 <br>
764 This directive exists only since version 1.2.22.
765 <div class="example"><pre>  
766   JkOptions     +ForwardSSLCertChain
767 </pre></div>
768
769 <br>
770 <br>
771 </p>
772
773 <p>
774 The directive <b>JkEnvVar</b> allows you to forward environment variables
775 from Apache server to Tomcat engine.
776 You can add a default value as a second parameter to the directive.
777 If the default value is not given explicitly, the variable
778 will only be send, if it is set during runtime.
779 <br>
780 The variables can be retrieved on the Tomcat side as request attributes
781 via request.getAttribute(attributeName).
782 Note that the variables send via JkEnvVar will not be listed
783 in request.getAttributeNames().
784 <br>
785 <br>
786 The variables are inherited from the global server to virtual hosts.
787
788 <div class="example"><pre>  
789   JkEnvVar     SSL_CLIENT_V_START     undefined
790 </pre></div>
791 <br>
792 <br>
793 </p>
794
795 </blockquote></td></tr></table>
796
797 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Assigning URLs to Tomcat"><strong>Assigning URLs to Tomcat</strong></a></font></td></tr><tr><td><blockquote>
798 <p>
799 If you have created a custom or local version of mod_jk.conf-local as noted above, 
800 you can change settings such as the workers or URL prefix.
801 </p>
802 <p>
803 <b>JkMount</b> directive assign specific URLs to Tomcat. 
804 In general the structure of a JkMount directive is:
805 </p>
806
807 <div class="example"><pre>  
808   JkMount [URL prefix] [Worker name]
809 </pre></div>
810
811 <div class="example"><pre>
812   # send all requests ending in .jsp to worker1
813   JkMount /*.jsp worker1
814   # send all requests ending /servlet to worker1
815   JkMount /*/servlet/ worker1
816   # send all requests jsp requests to files located in /otherworker will go worker2
817   JkMount /otherworker/*.jsp worker2
818 </pre></div>
819
820 <p>
821 You can use the JkMount directive at the top level or inside &lt;VirtualHost&gt;
822 sections of your httpd.conf file.
823 </p>
824 <p><b>JkUnMount</b> directive acts as an opposite to JkMount and blocks access
825 to a particular URL. The purpose is to be able to filter out the particular content
826 types from mounted context. The following example mounts /servlet/*
827 context, but all .gif files that belongs to that context are not served.
828 </p>
829 <div class="example"><pre>
830   # send all requests ending with /servlet to worker1
831   JkMount /servlet/* worker1
832   # do not send requests ending with .gif to worker1
833   JkUnMount /servlet/*.gif worker1
834 </pre></div>
835 <p>
836 JkUnMount takes precedence over JkMount directives, meaning that the JK
837 will first try to mount and then checks, if there is an exclusion defined by a
838 JkUnMount. A JkUnMount overrides a JkMount only, if the worker names in the
839 JkMount and in the JkUnMount are the same.
840 </p>
841 <p>
842 The following example will block all .gif files although there is a JkMount for them:
843 </p>
844 <div class="example"><pre>
845   # do not send requests ending with .gif to worker1
846   JkUnMount /*.gif worker1
847   # The .gif files will not be mounted cause JkUnMount takes
848   # precedence over JkMount directive
849   JkMount /servlet/*.gif worker1
850 </pre></div>
851 <p>
852 Starting with version 1.2.26 of JK you can apply a JkUnMount to any worker,
853 by using the star character '*' as the worker name in the JkUnMount.
854 More complex patterns in JkUnMount worker names are not allowed.
855 </p>
856 <div class="example"><pre>
857   # Mapping the webapps myapp1 and myapp2:
858   /myapp1/*=worker1
859   /myapp2/*=worker2
860   # Exclude the all subdirectories static for all workers:
861   !/*/static/*=*
862   # Exclude some suffixes for all workers:
863   !*.html=*
864 </pre></div>
865 <p>
866 <b>JkAutoAlias</b> directive automatically <b>Alias</b> webapp context directories into
867 the Apache document space. It enables Apache to serve a static context while Tomcat
868 serving dynamic context. This directive is used for convenience so that you don't
869 have to put an apache Alias directive for each application directory inside Tomcat's
870 webapp directory. For security reasons is is strongly recommended that JkMount
871 is used to pass all requests to Tomcat by default and JkUnMount is used to
872 explicitly exclude static content to be served by httpd. It should also be noted
873 that content served by httpd will bypass any security constraints defined in the
874 application's web.xml.
875 </p>
876 <div class="example"><pre>
877   # enter the full path to the tomcat webapps directory
878   JkAutoAlias /opt/tomtact/webapps
879 </pre></div>
880 <p>The following example shows how to serve a dynamic context by
881 Tomcat and static using Apache. The webapps directory has to
882 be accessible by apache.</p>
883
884 <div class="example"><pre>
885   # enter the full path to the tomcat webapps directory
886   JkAutoAlias /opt/tomtact/webapps
887
888   # Mount 'servlets-examples' directory. It's physical location
889   # is assumed to be in the /opt/tomtact/webapps/servlets-examples
890   # ajp13w is a worker defined in the workers.properties
891   JkMount /servlets-examples/* ajp13w
892
893   # Unmount desired static content from servlets-examples webapp.
894   # This content will be served by the httpd directly.
895   JkUnMount /servlets-examples/*.gif ajp13w
896   JkUnMount /servlets-examples/*.jpg ajp13w
897 </pre></div>
898 <p>Note that you can have a single JkAutoAlias directive per virtual
899 host inside your httpd.conf
900 </p>
901 <p>
902 <b>JkWorkerProperty</b> is a new directive available from JK 1.2.7
903 version. It is a convenient method for setting directives that are
904 usually set inside <b>workers.propeties</b> file. The parameter for
905 that directive is raw line from workers.properties file.
906 </p>
907 <div class="example"><pre>
908   # Just like workers.properties but exact line is prefixed
909   # with JkWorkerProperty
910
911   # Minimal jk configuration
912   JkWorkerProperty worker.list=ajp13w
913   JkWorkerProperty worker.ajp13w.type=ajp13
914   JkWorkerProperty worker.ajp13w.host=localhost
915   JkWorkerProperty worker.ajp13w.port=8009   
916 </pre></div>
917 <p>
918 <b>JkMountFile</b> is a new directive available from JK 1.2.9
919 version. It is used for dynamic updates of mount points at runtime.
920 When the mount file is changed, JK will reload it's content.
921 </p>
922 <div class="example"><pre>
923   # Load mount points
924
925   JkMountFile conf/uriworkermap.properties
926 </pre></div>
927 <p>If the mount point uri starts with an exclamation mark '!'
928 it defines an exclusion in the same way JkUnMount does.
929 If the mount point uri starts with minus sign '-'
930 the mount point will only be disabled. A disabled mount can be reenabled
931 by deleting the minus sign and waiting for the JkMountFile to reload.
932 An exclusion can be disabled by prefixing it with a minus sign.
933 </p>
934 <div class="example"><pre>
935   # Sample uriworkermap.properties file
936
937   /servlets-examples/*=ajp13w
938   # Do not map .jpeg files
939   !/servlets-examples/*.jpeg=ajp13w
940   # Make jsp examples initially disabled  
941   -/jsp-examples/*=ajp13w
942 </pre></div>
943 <p>At run time you can change the content of this file. For example
944 removing minus signs will enable the previously disabled uri mappings.
945 You can add any number of new entries at runtime that reflects the newly deployed
946 applications. Apache will reload the file and update the mount
947 points within 60 second interval.
948 </p>
949 <p>
950 There is no way to delete entries by dynamic reloading, but you can disable or
951 exclude mappings.
952 <br>
953 <br>
954 </p>
955
956 </blockquote></td></tr></table>
957
958 <table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Using SetHandler and Environment Variables"><strong>Using SetHandler and Environment Variables</strong></a></font></td></tr><tr><td><blockquote>
959 <p>
960 Alternatively to the mod_jk specific directives, you can also use
961 SetHandler and environment variables to control, which requests
962 are being forwarded via which worker. This gives you more flexibility,
963 but the results might be more difficult to understand. If you mix both
964 ways of defining the forwards, in general to mod_jk directives will win.
965 </p>
966 <p>
967 <b>SetHandler jakarta-servlet</b> forces requests to be handled by mod_jk.
968 If you neither specify any workers via JkMount and the related directives,
969 not via the environment variable described below,
970 the first worker in the list of all worker will be chosen. You can use SetHandler
971 for example in Location blocks or with Apache 2.2 also in RewriteRule.
972 </p>
973 <p>
974 In order to control the worker using <b>SetEnvIf</b> or <b>RewriteRule</b>
975 for more complex rules, you can set the environment variable <b>JK_WORKER_NAME</b>
976 to the name of your chosen target worker. This enables you to decide on
977 the chosen worker in a more flexible way, including dependencies on cookie values.
978 This feature has been added in version 1.2.19 of mod_jk.
979 </p>
980 <p>
981 In order to use another variable than <b>JK_WORKER_NAME</b>, you can set the name
982 of this variable via the <b>JkWorkerIndicator</b> directive.
983 </p>
984 <p>
985 You can also define exclusions from mod_jk forwards by setting the environment
986 variable <b>no-jk</b>.
987 </p>
988 <div class="example"><pre>
989   # Automatically map all encoded urls
990   &lt;Location *;jsessionid=&gt;
991     SetHandler jakarta-servlet
992     SetEnv JK_WORKER_NAME my_worker
993   &lt;/Location&gt;
994
995   # Map all subdirs to workers via naming rule
996   # and exclude static content.
997   &lt;Location /apps/&gt;
998     SetHandler jakarta-servlet
999     SetEnvIf REQUEST_URI ^/apps/([^/]*)/ JK_WORKER_NAME=$1
1000     SetEnvIf REQUEST_URI ^/apps/([^/]*)/static no-jk
1001   &lt;/Location&gt;
1002 </pre></div>
1003 <p>
1004 Finally, starting with version 1.2.27 you can use the environment variable
1005 <b>JK_REPLY_TIMEOUT</b> to dynamically set a reply timeout.
1006 </p>
1007 </blockquote></td></tr></table>
1008  </blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr noshade size="1"></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font color="#525D76" size="-1"><em>
1009         Copyright &copy; 1999-2011, Apache Software Foundation
1010         </em></font></div></td></tr></table></body></html>