You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2012/03/31 20:52:23 UTC

svn commit: r1307873 [13/22] - in /tomcat/site/trunk/docs: connectors-doc/ connectors-doc/ajp/ connectors-doc/ajp/printer/ connectors-doc/generic_howto/ connectors-doc/generic_howto/printer/ connectors-doc/images/ connectors-doc/miscellaneous/ connecto...

Added: tomcat/site/trunk/docs/connectors-doc/reference/printer/apache.html
URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/connectors-doc/reference/printer/apache.html?rev=1307873&view=auto
==============================================================================
--- tomcat/site/trunk/docs/connectors-doc/reference/printer/apache.html (added)
+++ tomcat/site/trunk/docs/connectors-doc/reference/printer/apache.html Sat Mar 31 18:52:20 2012
@@ -0,0 +1,1071 @@
+<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 Software Foundation" 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%" cells
 pacing="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" alt=" "></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>
+<p>
+Most of the directives are allowed once in the global part of the Apache httpd
+configuration and once in every &lt;VirtualHost&gt; elements. Exceptions from this rule are
+explicitly listed in the table below.
+</p>
+<p>
+Most values are inherited from the main server to the virtual hosts.
+Since version 1.2.20 they can be overwritten in the virtual hosts.
+Exceptions from this rule are again explicitly listed in the table below.
+See especially JkMountCopy.
+</p>
+<p><font color="#ff0000">
+Warning: If Apache httpd and Tomcat are configured to serve content from
+the same filing system location then care must be taken to ensure that httpd is
+not able to serve inappropriate content such as the contents of the WEB-INF
+directory or JSP source code.
+</font></p>
+<p>
+This could occur if the httpd DocumentRoot
+overlaps with a Tomcat Host's appBase or the docBase of any Context. It could
+also occur when using the httpd Alias directive with a Tomcat Host's appBase or
+the docBase of any Context.
+</p>
+<p>
+Here are the all directives supported by Apache:
+</p>
+<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>
+The name of a worker file for the Tomcat servlet containers.
+<br>
+This directive is only allowed once. It must be put into
+the global part of the configuration.
+<br>
+If you don't use the JkWorkerProperty directives, then you must
+define your workers with a valid JkWorkersFile. There is no default
+value.
+</p></td></tr><tr><td align="left" valign="center"><code>JkWorkerProperty</code></td><td align="left" valign="center"><p>
+Enables setting worker properties inside Apache configuration file.
+The syntax is the same as in the JkWorkersFile (usually workers.properties).
+Simply prefix each line with "JkWorkerProperty" to put it directly into
+the Apache httpd config files.
+<br>
+This directive is allowed multiple times.
+It must be put into the global part of the configuration.
+<br>
+If you don't use the JkWorkerProperty directives, then you must
+define your workers with a valid JkWorkersFile. There is no default
+value.
+<br>
+This directive is available in jk1.2.7 version and later.
+</p></td></tr><tr><td align="left" valign="center"><code>JkShmFile</code></td><td align="left" valign="center"><p>
+Shared memory file name. Used only on unix platforms.
+The shm file is used by balancer and status workers.
+<br>
+This directive is only allowed once. It must be put into
+the global part of the configuration.
+<br>
+The default value is logs/jk-runtime-status.
+It is highly recommended that the shm file be placed on a local
+drive and not an NFS share.
+</p>
+<p>
+The shared memory contains configuration and runtime information for load balancer
+workers and their members. It is need in order that all apache children
+<ul>
+<li>share the same status information for load balancing members (OK, ERROR, ...),</li>
+<li>share the information about load taken by the individual workers,</li>
+<li>share the information for the parts of the configuration, which are changeable
+during runtime by status workers.</li>
+</ul>
+</p>
+</td></tr><tr><td align="left" valign="center"><code>JkShmSize</code></td><td align="left" valign="center"><p>
+Size of the shared memory file name.
+<br>
+This directive is only allowed once. It must be put into
+the global part of the configuration.
+<br>
+The default value depends on the platform. It is usually less than 64KB.
+</p></td></tr><tr><td align="left" valign="center"><code>JkMountFile</code></td><td align="left" valign="center"><p>
+File containing multiple mappings from a context to a Tomcat worker.
+It is usually called uriworkermap.properties.
+<br>
+For inheritance rules, see: JkMountCopy.
+<br>
+There is no default value.
+</p></td></tr><tr><td align="left" valign="center"><code>JkMountFileReload</code></td><td align="left" valign="center"><p>
+This directive configures the reload check interval in seconds.
+The JkMountFile is checked periodically for changes.
+A changed file gets reloaded automatically. If you set
+this directive to "0", reload checking is turned off.
+<br>
+The default value is 60 seconds.
+<br>
+This directive has been added in version 1.2.20 of mod_jk.
+</p></td></tr><tr><td align="left" valign="center"><code>JkMount</code></td><td align="left" valign="center"><p>
+A mount point from a context to a Tomcat worker.
+<br>
+This directive is allowed multiple times.
+It is allowed in the global configuration and in VirtualHost.
+You can also use it inside Location with a different syntax.
+Inside Location, one omits the first argument (path),
+which gets inherited from the Location.
+<br>
+By default JkMount entries are not inherited from the global
+server to other VirtualHosts or between VirtualHosts.
+For the complete inheritance rules, see: JkMountCopy.
+<br>
+You might append rule extensions to the worker name.
+The extensions are separated from the worker name by a
+semicolon ";" using the same syntax as in the
+uriworkermap.properties file.
+</p></td></tr><tr><td align="left" valign="center"><code>JkUnMount</code></td><td align="left" valign="center"><p>
+An exclusion mount point from a context to a Tomcat worker.
+All exclusion mounts are checked after mapping a request
+to a tomcat worker. If the request maps also to an exclusion,
+it will not be forwarded to tomcat, and instead be served locally.
+<br>
+This directive is allowed multiple times.
+It is allowed in the global configuration and in VirtualHost.
+You can also use it inside Location with a different syntax.
+Inside Location, one omits the first argument (path),
+which gets inherited from the Location.
+For inheritance rules, see: JkMountCopy.
+<br>
+This directive is available in jk1.2.7 version and later.
+</p></td></tr><tr><td align="left" valign="center"><code>JkAutoAlias</code></td><td align="left" valign="center"><p>
+Automatically Alias webapp context directories into the Apache
+document space.
+<br>
+Care should be taken to ensure that only static content is served via httpd as a
+result of using this directive. Any static content served by httpd will bypass any
+security constraints defined in the application's web.xml.
+<br>
+For inheritance rules, see: JkMountCopy.
+<br>
+There is no default value.
+</p></td></tr><tr><td align="left" valign="center"><code>JkMountCopy</code></td><td align="left" valign="center"><p>
+If this directive is set to "On" in some virtual server,
+the mounts from the global server will be copied to this
+virtual server, more precisely all mounts defined by JkMount
+or JkUnMount. The Mounts defined by JkMountFile and JkAutoAlias
+will only be inherited, if the VirtualHost does not define
+it's own JkMountFile or JkAutoAlias.
+<br>
+If you want all vhost to inherit mounts from the main server,
+you can set JkMountCopy to 'All' in the main server.
+<br>
+This directive is only allowed inside VirtualHost (with value "On")
+and in the global server (with value "All").
+<br>
+The default is Off, so no mounts will be inherited from the global
+server to any VirtualHost.
+<br>
+Starting with version 1.2.26 you can also set it to "All" in the
+global virtual server. This will switch the default to On.
+</p></td></tr><tr><td align="left" valign="center"><code>JkWorkerIndicator</code></td><td align="left" valign="center"><p>
+Name of the Apache environment variable that can be used to set worker names
+in combination with SetHandler jakarta-servlet.
+<br>
+This directive is only allowed once per virtual server.
+It is allowed in the global configuration and in VirtualHost.
+<br>
+The default value is JK_WORKER_NAME.
+</p></td></tr><tr><td align="left" valign="center"><code>JkWatchdogInterval</code></td><td align="left" valign="center"><p>
+This directive configures the watchdog thread interval in seconds.
+The workers are maintained periodically by a background thread
+running periodically every watchdog_interval seconds. Worker maintenance
+checks for idle connections, corrects load status and is able
+to detect backend health status.
+<br>
+The maintenance only happens, if since the last maintenance at
+least <a href="workers.html"><b class="code">worker.maintain</b></a>
+seconds have passed. So setting the JkWatchdogInterval
+much smaller than <b class="code">worker.maintain</b> is not useful.
+<br>
+The default value is 0 seconds, meaning the watchdog thread
+will not be created, and the maintenance is done in combination
+with normal requests instead.
+<br>
+This directive is only allowed once. It must be put into
+the global part of the configuration.
+<br>
+This directive has been added in version 1.2.27 of mod_jk.
+It is available only for httpd 2.x and above using APR libraries
+including thread support.
+</p></td></tr><tr><td align="left" valign="center"><code>JkLogFile</code></td><td align="left" valign="center"><p>
+Full or server relative path to the Tomcat Connector module log file.
+It will also work with pipe, by using a value of the form "| ...".
+<br>
+The default value is logs/mod_jk.log.
+<br>
+Pipes are supported for Apache 1.3 only since version 1.2.16.
+The default value exists only since version 1.2.20.
+</p></td></tr><tr><td align="left" valign="center"><code>JkLogLevel</code></td><td align="left" valign="center"><p>
+The Tomcat Connector module log level, can be debug, info, warn
+error or trace.
+<br>
+The default value is info.
+</p></td></tr><tr><td align="left" valign="center"><code>JkLogStampFormat</code></td><td align="left" valign="center"><p>
+The Tomcat Connector module <b>date</b> log format, using an
+extended strftime syntax.
+This format will be used for the time stamps in the JkLogFile.
+The maximum length of the format is 63 characters.
+<br>
+Starting with version 1.2.24 of mod_jk you can also use %Q
+for adding milliseconds to the log and %q for microseconds. 
+These conversion specifiers are an extension to strftime.
+They will only work on platforms with a gettimeofday() function.
+You can use %Q and %q only once in the pattern and also not both
+together in the same pattern.
+<br>
+The default value is "[%a %b %d %H:%M:%S %Y] " and beginning
+with version 1.2.24 on platforms with a gettimeofday()
+function it is "[%a %b %d %H:%M:%S.%Q %Y] ".
+</p></td></tr><tr><td align="left" valign="center"><code>JkRequestLogFormat</code></td><td align="left" valign="center"><p>
+Request log format string. See detailed description below.
+<br>
+There is no default value. Without defining a value, the request logging
+is turned off.
+</p></td></tr><tr><td align="left" valign="center"><code>JkExtractSSL</code></td><td align="left" valign="center"><p>
+Turns on SSL processing and information gathering by mod_jk
+<br>
+The default value is On.
+<br>
+In order to make SSL data available for mod_jk in Apache, you need to
+set <b class="code">SSLOptions +StdEnvVars</b>. For the certificate information you also need
+to add <b class="code">SSLOptions +ExportCertData</b>.
+</p>
+<p>
+  Specifically, mod_jk will export the following environment variables from
+  Apache httpd to Tomcat under these request attributes as per the
+  Servlet Specification 3.0, section 3.8:
+</p>
+<table>
+  <tr><th>Env Var</th><th>Request Attribute Name</th><th>Type</th><th>Example</th></tr>
+  <tr>
+    <td>SSL_CIPHER<br>(or <b class="code">JkKEYSIZEIndicator</b>)</td>
+    <td>javax.servlet.request.cipher_suite</td>
+    <td>java.lang.String</td>
+    <td>DHE-RSA-AES256-SHA</td>
+  </tr>
+  <tr>
+    <td>SSL_CIPHER_USEKEYSIZE<br>(or <b class="code">JkKEYSIZEIndicator</b>)</td>
+    <td>javax.servlet.request.key_size</td>
+    <td>java.lang.Integer</td>
+    <td>256</td>
+  </tr>
+  <tr>
+    <td>SSL_SESSION_ID<br>(or <b class="code">JkSESSIONIndicator</b>)</td>
+    <td>javax.servlet.request.ssl_session</td>
+    <td>java.lang.String</td>
+    <td>905...32E (a hex string)</td>
+  </tr>
+  <tr>
+    <td>SSL_CLIENT_CERT_CHAIN_<i>n</i><br>(or <b class="code">JkCERTCHAINPrefix</b><i>n</i>)</td>
+    <td>javax.servlet.request.X509Certificate</td>
+    <td>java.security.X509Certificate[]</td>
+    <td>(A chain of certs in ascending order of trust, the first one being
+        ths client's certificate, the second being the signer of that
+        certificate, and so on)</td>
+  </tr>
+</table>
+<p>
+  For all other SSL-related variables, use <b class="code">JkEnvVar</b> for each
+  variable you want. Please note that, like <b class="code">JkEnvVar</b>, these
+  variables are available from the request <i><b>attributes</b></i>, not as
+  environment variables or as request headers.
+</p>
+</td></tr><tr><td align="left" valign="center"><code>JkHTTPSIndicator</code></td><td align="left" valign="center"><p>
+Name of the Apache environment variable that contains SSL indication.
+<br>
+The default value is "HTTPS".
+</p></td></tr><tr><td align="left" valign="center"><code>JkCERTSIndicator</code></td><td align="left" valign="center"><p>
+Name of the Apache environment variable that contains SSL client certificates.
+<br>
+The default value is "SSL_CLIENT_CERT".
+</p></td></tr><tr><td align="left" valign="center"><code>JkCIPHERIndicator</code></td><td align="left" valign="center"><p>
+Name of the Apache environment variable that contains SSL client cipher.
+<br>
+The default value is "SSL_CIPHER".
+</p></td></tr><tr><td align="left" valign="center"><code>JkCERTCHAINPrefix</code></td><td align="left" valign="center"><p>
+Name of the Apache environment (prefix) that contains SSL client chain certificates.
+<br>
+The default value is "SSL_CLIENT_CERT_CHAIN_".
+</p></td></tr><tr><td align="left" valign="center"><code>JkSESSIONIndicator</code></td><td align="left" valign="center"><p>
+Name of the Apache environment variable that contains SSL session.
+<br>
+The default value is "SSL_SESSION_ID".
+</p></td></tr><tr><td align="left" valign="center"><code>JkKEYSIZEIndicator</code></td><td align="left" valign="center"><p>
+Name of the Apache environment variable that contains SSL key size in use.
+<br>
+The default value is "SSL_CIPHER_USEKEYSIZE".
+</p></td></tr><tr><td align="left" valign="center"><code>JkLocalNameIndicator</code></td><td align="left" valign="center"><p>
+Name of the Apache environment variable which can be used to overwrite
+the forwarded local name.
+Use this only if you need to adjust the data (see the
+<a href="../../generic_howto/proxy.html">proxy</a> documentation).
+<br>
+The default value is "JK_LOCAL_NAME".
+<br>
+This directive has been added in version 1.2.28 of mod_jk.
+</p></td></tr><tr><td align="left" valign="center"><code>JkLocalPortIndicator</code></td><td align="left" valign="center"><p>
+Name of the Apache environment variable which can be used to overwrite
+the forwarded local port.
+Use this only if you need to adjust the data (see the
+<a href="../../generic_howto/proxy.html">proxy</a> documentation).
+<br>
+The default value is "JK_LOCAL_PORT".
+<br>
+This directive has been added in version 1.2.28 of mod_jk.
+</p></td></tr><tr><td align="left" valign="center"><code>JkRemoteHostIndicator</code></td><td align="left" valign="center"><p>
+Name of the Apache environment variable which can be used to overwrite
+the forwarded remote (client) host name.
+Use this only if you need to adjust the data (see the
+<a href="../../generic_howto/proxy.html">proxy</a> documentation).
+<br>
+The default value is "JK_REMOTE_HOST".
+<br>
+This directive has been added in version 1.2.28 of mod_jk.
+</p></td></tr><tr><td align="left" valign="center"><code>JkRemoteAddrIndicator</code></td><td align="left" valign="center"><p>
+Name of the Apache environment variable which can be used to overwrite
+the forwarded remote (client) IP address.
+Use this only if you need to adjust the data (see the
+<a href="../../generic_howto/proxy.html">proxy</a> documentation).
+<br>
+The default value is "JK_REMOTE_ADDR".
+<br>
+This directive has been added in version 1.2.28 of mod_jk.
+</p></td></tr><tr><td align="left" valign="center"><code>JkRemotePortIndicator</code></td><td align="left" valign="center"><p>
+Name of the Apache environment variable which can be used to overwrite
+the forwarded remote (client) IP address.
+Use this only if you need to adjust the data (see the
+<a href="../../generic_howto/proxy.html">proxy</a> documentation).
+<br>
+The default value is "JK_REMOTE_PORT".
+<br>
+This directive has been added in version 1.2.32 of mod_jk.
+</p></td></tr><tr><td align="left" valign="center"><code>JkRemoteUserIndicator</code></td><td align="left" valign="center"><p>
+Name of the Apache environment variable which can be used to overwrite
+the forwarded user name.
+Use this only if you need to adjust the data (see the
+<a href="../../generic_howto/proxy.html">proxy</a> documentation).
+<br>
+The default value is "JK_REMOTE_USER".
+<br>
+This directive has been added in version 1.2.28 of mod_jk.
+</p></td></tr><tr><td align="left" valign="center"><code>JkAuthTypeIndicator</code></td><td align="left" valign="center"><p>
+Name of the Apache environment variable which can be used to overwrite
+the forwarded authentication type.
+Use this only if you need to adjust the data (see the
+<a href="../../generic_howto/proxy.html">proxy</a> documentation).
+<br>
+The default value is "JK_AUTH_TYPE".
+<br>
+This directive has been added in version 1.2.28 of mod_jk.
+</p></td></tr><tr><td align="left" valign="center"><code>JkOptions</code></td><td align="left" valign="center"><p>
+Set one of more options to configure the mod_jk module. See below for
+details about this directive.
+<br>
+This directive can be used multiple times per virtual server.
+<br>
+The default value is "ForwardURIProxy" since version 1.2.24.
+It was "ForwardURICompatUnparsed" in version 1.2.23 and
+"ForwardURICompat" until version 1.2.22.
+</p></td></tr><tr><td align="left" valign="center"><code>JkEnvVar</code></td><td align="left" valign="center"><p>
+Adds a name and an optional default value of environment variable
+that should be sent to servlet-engine as a request attribute.
+If the default value is not given explicitly, the variable
+will only be send, if it is set during runtime.
+<br>
+The default is empty, so no additional variables will be sent.
+<br>
+This directive can be used multiple times per virtual server.
+The settings will be merged between the global server and any
+virtual server.
+<br>
+You can retrieve the variables on Tomcat as request attributes
+via request.getAttribute(attributeName). Note that the variables
+send via JkEnvVar will not be listed in request.getAttributeNames().
+<br>
+Empty default values are supported since version 1.2.20.
+Not sending variables with empty defaults and empty runtime value
+has been introduced in version 1.2.21.
+</p></td></tr><tr><td align="left" valign="center"><code>JkStripSession</code></td><td align="left" valign="center"><p>
+If this directive is set to On in some virtual server,
+the session IDs <b class="code">;jsessionid=...</b> will be
+removed for non matched URLs.
+<br>
+This directive is only allowed inside VirtualHost.
+<br>
+The default is Off.
+<br>
+This directive has been introduced in version 1.2.21.
+<br>With version 1.2.27 and later this directive can have optional
+session ID identifier. If not specified it defaults to
+<b class="code">;jsessionid</b>.
+</p>
+</td></tr></table>
+</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>
+<p>
+We'll discuss here the mod_jk directive types.
+</p>
+
+<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>
+<p>
+<b>JkWorkersFile</b> specify the location where mod_jk will find the workers definitions.
+Take a look at <a href="workers.html">Workers documentation</a> for detailed description.
+
+<div class="example"><pre>
+  JkWorkersFile     /etc/httpd/conf/workers.properties
+</pre></div>
+
+<br>
+<br>
+</p>
+
+</blockquote></td></tr></table>
+
+<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>
+<p>
+<b>JkLogFile</b> specify the location where mod_jk is going to place its log file.
+</p>
+
+<div class="example"><pre>
+  JkLogFile     /var/log/httpd/mod_jk.log
+</pre></div>
+
+<p>
+Since JK 1.2.3 for Apache 2.x and JK 1.2.16 for Apache 1.3 this can also
+be used for piped logging:
+</p>
+
+<div class="example"><pre>
+  JkLogFile     "|/usr/bin/rotatelogs /var/log/httpd/mod_jk.log 86400"
+</pre></div>
+
+<p>
+<b>JkLogLevel</b>
+set the log level between :
+</p>
+
+<ul>
+<li>
+<b>info</b> log will contain standard mod_jk activity (default).
+</li>
+<li>
+<b>warn</b> log will contain non fatal error reports.
+</li>
+<li>
+<b>error</b> log will contain also error reports.
+</li>
+<li>
+<b>debug</b> log will contain all information on mod_jk activity
+</li>
+<li>
+<b>trace</b> log will contain all tracing information on mod_jk activity
+</li>
+</ul>
+
+<div class="example"><pre>  
+  JkLogLevel    info
+</pre></div>
+
+<p>
+<b class="code">info</b> should be your default selection for normal operations.
+<br>
+<br>
+</p>
+
+<p>
+<b>JkLogStampFormat</b> will configure the date/time format found on mod_jk log file. 
+Using the strftime() format string it's set by<br>
+default to <b>"[%a %b %d %H:%M:%S %Y]"</b>
+</p>
+
+<div class="example"><pre>
+  JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
+</pre></div>
+
+<p>
+<br>
+<br>
+</p>
+
+<p>
+<b>JkRequestLogFormat</b> will configure the format of mod_jk individual request logging. 
+Request logging is configured and enabled on a per virtual host basis. 
+To enable request logging for a virtual host just add a JkRequestLogFormat config. 
+The syntax of the format string is similar to the Apache LogFormat command, 
+here is a list of the available request log format options:
+</p>
+
+<p>
+<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 wit
 h 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>
+
+<div class="example"><pre>
+  JkRequestLogFormat     "%w %V %T"
+</pre></div>
+
+<br>
+<br>
+</p>
+
+<p>
+You can also log mod_jk information using the Apache standard module <b>mod_log_config</b>.
+The module sets several notes in the Apache httpd notes table.
+Most of them are are only useful in combination with a load balancer worker.
+</p>
+
+<p>
+<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>
+                                                         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>
+                                                         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_SESSIONS</code></td><td align="left" valign="center">Load-Balancer: Count of created sessions 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 t
 ried</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_SESSIONS</code></td><td align="left" valign="center">Load-Balancer: Count of created sessions 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: Err
 or 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>
+
+<div class="example"><pre>
+  LogFormat     "%h %l %u %t \"%r\" %&gt;s %b %{JK_WORKER_NAME}n %{JK_LB_FIRST_NAME}n \
+                 %{JK_LB_FIRST_BUSY}n %{JK_LB_LAST_NAME}n %{JK_LB_LAST_BUSY}n" mod_jk_log
+  CustomLog     logs/access_log     mod_jk_log
+</pre></div>
+
+<br>
+<br>
+</p>
+
+</blockquote></td></tr></table>
+
+<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>
+<p>
+The directive JkOptions allow you to set many forwarding options which will enable (+)
+or disable (-) following option. Without any leading signs, options will be enabled.
+<br>
+<br>
+</p>
+
+<p>
+The four following options <b>+ForwardURIxxx</b> are mutually exclusive.
+Exactly one of them is required, a negative sign prefix is not allowed with them.
+The default value is "ForwardURIProxy" since version 1.2.24.
+It was "ForwardURICompatUnparsed" in version 1.2.23 and
+"ForwardURICompat" until version 1.2.22.
+You can turn the default off by switching on one of the other two options.
+You should leave this at it's default value, unless you have a very good
+reason to change it.
+<br>
+<br>
+</p>
+
+<p>
+All options are inherited from the global server to virtual hosts.
+Options that support enabling (plus options) and disabling (minus options),
+are inherited in the following way:
+<br>
+<br>
+options(vhost) = plus_options(global) - minus_options(global) + plus_options(vhost) - minus_options(vhost)
+<br>
+<br>
+</p>
+
+<p>
+Using JkOptions <b>ForwardURIProxy</b>, the forwarded URI
+will be partially reencoded after processing inside Apache httpd and
+before forwarding to Tomcat. This will be compatible with local
+URL manipulation by mod_rewrite and with URL encoded session ids.
+
+<div class="example"><pre>
+  JkOptions     +ForwardURIProxy
+</pre></div>
+
+<br>
+<br>
+</p>
+
+<p>
+Using JkOptions <b>ForwardURICompatUnparsed</b>, the forwarded URI
+will be unparsed. It's spec compliant and secure.
+It will always forward the original request URI, so rewriting
+URIs with mod_rewrite and then forwarding the rewritten URI
+will not work.
+
+<div class="example"><pre>
+  JkOptions     +ForwardURICompatUnparsed
+</pre></div>
+
+<br>
+<br>
+</p>
+
+<p>
+Using JkOptions <b>ForwardURICompat</b>, the forwarded URI will
+be decoded by Apache httpd. Encoded characters will be decoded and
+explicit path components like ".." will already be resolved.
+This is less spec compliant and is <b>not safe</b> if you are using
+prefix JkMount. This option will allow to rewrite URIs with
+mod_rewrite before forwarding.
+
+<div class="example"><pre>
+  JkOptions     +ForwardURICompat
+</pre></div>
+
+<br>
+<br>
+</p>
+
+<p>
+Using JkOptions <b>ForwardURIEscaped</b>, the forwarded URI will
+be the encoded form of the URI used by ForwardURICompat.
+Explicit path components like ".." will already be resolved.
+This will not work in combination with URL encoded session IDs,
+but it will allow to rewrite URIs with mod_rewrite before forwarding.
+
+<div class="example"><pre>
+  JkOptions     +ForwardURIEscaped
+</pre></div>
+
+<br>
+<br>
+</p>
+
+<p>
+JkOptions <b>RejectUnsafeURI</b> will block all
+URLs, which contain percent signs '%' or backslashes '\'
+after decoding.
+<br>
+<br>
+</p>
+<p>
+Most web apps do not use such URLs. Using the option RejectUnsafeURI, you
+can block several well known URL encoding attacks. By default, this option
+is not set.
+</p>
+<p>
+You can also realise such a check with mod_rewrite, which is more powerful
+but also slightly more complicated.
+
+<div class="example"><pre>  
+  JkOptions     +RejectUnsafeURI
+</pre></div>
+
+<br>
+<br>
+</p>
+
+<p>
+JkOptions <b>ForwardDirectories</b> is used in conjunction with <b>DirectoryIndex</b>
+directive of Apache web server. As such mod_dir should be available to Apache,
+statically or dynamically (DSO)
+<br>
+<br>
+</p>
+
+<p>
+When DirectoryIndex is configured, Apache will create sub-requests for
+each of the local-url's specified in the directive, to determine if there is a
+local file that matches (this is done by stat-ing the file).
+</p>
+
+<p>
+If ForwardDirectories is set to false (default) and Apache doesn't find any
+files that match, Apache will serve the content of the directory (if directive
+Options specifies Indexes for that directory) or a <b class="code">403 Forbidden</b> response (if
+directive Options doesn't specify Indexes for that directory).
+</p>
+
+<p>
+If ForwardDirectories is set to true and Apache doesn't find any files that
+match, the request will be forwarded to Tomcat for resolution. This is used in
+cases when Apache cannot see the index files on the file system for various
+reasons: Tomcat is running on a different machine, the JSP file has been
+precompiled etc. 
+</p>
+
+<p>Note that locally visible files will take precedence over the
+ones visible only to Tomcat (i.e. if Apache can see the file, that's the one
+that's going to get served). This is important if there is more then one type of
+file that Tomcat normally serves - for instance Velocity pages and JSP pages.
+
+<div class="example"><pre>  
+  JkOptions     +ForwardDirectories
+</pre></div>
+<br>
+<br>
+</p>
+
+<p>
+JkOptions <b>ForwardLocalAddress</b>, you ask mod_jk to send the local address,
+of the Apache web server instead remote client address. This can be used by
+Tomcat remote address valve for allowing connections only from registered Apache
+web servers.
+
+<div class="example"><pre>  
+  JkOptions     +ForwardLocalAddress
+</pre></div>
+
+<br>
+<br>
+</p>
+
+<p>
+JkOptions <b>FlushPackets</b>, you ask mod_jk to flush Apache's connection
+buffer after each AJP packet chunk received from Tomcat. This option can have
+a strong performance penalty for Apache and Tomcat as writes are performed
+more often than would normally be required (ie: at the end of each
+response).
+
+<div class="example"><pre>  
+  JkOptions     +FlushPackets
+</pre></div>
+
+<br>
+<br>
+</p>
+
+<p>
+JkOptions <b>FlushHeader</b>, you ask mod_jk to flush Apache's connection
+buffer after the response headers have been  received from Tomcat.
+
+<div class="example"><pre>  
+  JkOptions     +FlushHeader
+</pre></div>
+
+<br>
+<br>
+</p>
+
+<p>
+JkOptions <b>DisableReuse</b>, you ask mod_jk to close connections immediately
+after their use. Normally mod_jk uses persistent connections and pools idle
+connections to reuse them, when new requests have to be sent to Tomcat.
+</p>
+
+<p>
+Using this option will have a strong performance penalty for Apache and Tomcat.
+Use this only as a last resort in case of unfixable network problems.
+If a firewall between Apache and Tomcat silently kills idle connections,
+try to use the worker attribute socket_keepalive in combination with an appropriate
+TCP keepalive value in your OS.
+
+<div class="example"><pre>  
+  JkOptions     +DisableReuse
+</pre></div>
+
+<br>
+<br>
+</p>
+
+<p>
+JkOptions <b>ForwardKeySize</b>,  you ask mod_jk, when using ajp13, to forward also the SSL Key Size  as 
+required by Servlet API 2.3.
+This flag shouldn't be set when servlet engine is Tomcat 3.2.x (on by default).
+
+<div class="example"><pre>  
+  JkOptions     +ForwardKeySize
+</pre></div>
+
+<br>
+<br>
+</p>
+
+<p>
+JkOptions <b>ForwardSSLCertChain</b>,  you ask mod_jk, when using ajp13,
+to forward SSL certificate chain (off by default).
+Mod_jk only passes the <b class="code">SSL_CLIENT_CERT</b> to the AJP connector. This is not a
+problem with self-signed certificates or certificates directly signed by the
+root CA certificate. However, there's a large number of certificates signed by
+an intermediate CA certificate, where this is a significant problem: A servlet
+will not have the possibility to validate the client certificate on its own. The
+bug would be fixed by passing on the <b class="code">SSL_CLIENT_CERT_CHAIN</b> to Tomcat via the AJP connector.
+<br>
+This directive exists only since version 1.2.22.
+<div class="example"><pre>  
+  JkOptions     +ForwardSSLCertChain
+</pre></div>
+
+<br>
+<br>
+</p>
+
+<p>
+The directive <b>JkEnvVar</b> allows you to forward environment variables
+from Apache server to Tomcat engine.
+You can add a default value as a second parameter to the directive.
+If the default value is not given explicitly, the variable
+will only be send, if it is set during runtime.
+<br>
+The variables can be retrieved on the Tomcat side as request attributes
+via request.getAttribute(attributeName).
+Note that the variables send via JkEnvVar will not be listed
+in request.getAttributeNames().
+<br>
+<br>
+The variables are inherited from the global server to virtual hosts.
+
+<div class="example"><pre>  
+  JkEnvVar     SSL_CLIENT_V_START     undefined
+</pre></div>
+<br>
+<br>
+</p>
+
+</blockquote></td></tr></table>
+
+<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>
+<p>
+If you have created a custom or local version of mod_jk.conf-local as noted above, 
+you can change settings such as the workers or URL prefix.
+</p>
+<p>
+<b>JkMount</b> directive assign specific URLs to Tomcat. 
+In general the structure of a JkMount directive is:
+</p>
+
+<div class="example"><pre>  
+  JkMount [URL prefix] [Worker name]
+</pre></div>
+
+<div class="example"><pre>
+  # send all requests ending in .jsp to worker1
+  JkMount /*.jsp worker1
+  # send all requests ending /servlet to worker1
+  JkMount /*/servlet/ worker1
+  # send all requests jsp requests to files located in /otherworker will go worker2
+  JkMount /otherworker/*.jsp worker2
+</pre></div>
+
+<p>
+You can use the JkMount directive at the top level or inside &lt;VirtualHost&gt;
+sections of your httpd.conf file.
+</p>
+<p><b>JkUnMount</b> directive acts as an opposite to JkMount and blocks access
+to a particular URL. The purpose is to be able to filter out the particular content
+types from mounted context. The following example mounts /servlet/*
+context, but all .gif files that belongs to that context are not served.
+</p>
+<div class="example"><pre>
+  # send all requests ending with /servlet to worker1
+  JkMount /servlet/* worker1
+  # do not send requests ending with .gif to worker1
+  JkUnMount /servlet/*.gif worker1
+</pre></div>
+<p>
+JkUnMount takes precedence over JkMount directives, meaning that the JK
+will first try to mount and then checks, if there is an exclusion defined by a
+JkUnMount. A JkUnMount overrides a JkMount only, if the worker names in the
+JkMount and in the JkUnMount are the same.
+</p>
+<p>
+The following example will block all .gif files although there is a JkMount for them:
+</p>
+<div class="example"><pre>
+  # do not send requests ending with .gif to worker1
+  JkUnMount /*.gif worker1
+  # The .gif files will not be mounted cause JkUnMount takes
+  # precedence over JkMount directive
+  JkMount /servlet/*.gif worker1
+</pre></div>
+<p>
+Starting with version 1.2.26 of JK you can apply a JkUnMount to any worker,
+by using the star character '*' as the worker name in the JkUnMount.
+More complex patterns in JkUnMount worker names are not allowed.
+</p>
+<div class="example"><pre>
+  # Mapping the webapps myapp1 and myapp2:
+  /myapp1/*=worker1
+  /myapp2/*=worker2
+  # Exclude the all subdirectories static for all workers:
+  !/*/static/*=*
+  # Exclude some suffixes for all workers:
+  !*.html=*
+</pre></div>
+<p>
+<b>JkAutoAlias</b> directive automatically <b>Alias</b> webapp context directories into
+the Apache document space. It enables Apache to serve a static context while Tomcat
+serving dynamic context. This directive is used for convenience so that you don't
+have to put an apache Alias directive for each application directory inside Tomcat's
+webapp directory. For security reasons is is strongly recommended that JkMount
+is used to pass all requests to Tomcat by default and JkUnMount is used to
+explicitly exclude static content to be served by httpd. It should also be noted
+that content served by httpd will bypass any security constraints defined in the
+application's web.xml.
+</p>
+<div class="example"><pre>
+  # enter the full path to the tomcat webapps directory
+  JkAutoAlias /opt/tomtact/webapps
+</pre></div>
+<p>The following example shows how to serve a dynamic context by
+Tomcat and static using Apache. The webapps directory has to
+be accessible by apache.</p>
+
+<div class="example"><pre>
+  # enter the full path to the tomcat webapps directory
+  JkAutoAlias /opt/tomtact/webapps
+
+  # Mount 'servlets-examples' directory. It's physical location
+  # is assumed to be in the /opt/tomtact/webapps/servlets-examples
+  # ajp13w is a worker defined in the workers.properties
+  JkMount /servlets-examples/* ajp13w
+
+  # Unmount desired static content from servlets-examples webapp.
+  # This content will be served by the httpd directly.
+  JkUnMount /servlets-examples/*.gif ajp13w
+  JkUnMount /servlets-examples/*.jpg ajp13w
+</pre></div>
+<p>Note that you can have a single JkAutoAlias directive per virtual
+host inside your httpd.conf
+</p>
+<p>
+<b>JkWorkerProperty</b> is a new directive available from JK 1.2.7
+version. It is a convenient method for setting directives that are
+usually set inside <b>workers.propeties</b> file. The parameter for
+that directive is raw line from workers.properties file.
+</p>
+<div class="example"><pre>
+  # Just like workers.properties but exact line is prefixed
+  # with JkWorkerProperty
+
+  # Minimal jk configuration
+  JkWorkerProperty worker.list=ajp13w
+  JkWorkerProperty worker.ajp13w.type=ajp13
+  JkWorkerProperty worker.ajp13w.host=localhost
+  JkWorkerProperty worker.ajp13w.port=8009   
+</pre></div>
+<p>
+<b>JkMountFile</b> is a new directive available from JK 1.2.9
+version. It is used for dynamic updates of mount points at runtime.
+When the mount file is changed, JK will reload it's content.
+</p>
+<div class="example"><pre>
+  # Load mount points
+
+  JkMountFile conf/uriworkermap.properties
+</pre></div>
+<p>If the mount point uri starts with an exclamation mark '!'
+it defines an exclusion in the same way JkUnMount does.
+If the mount point uri starts with minus sign '-'
+the mount point will only be disabled. A disabled mount can be reenabled
+by deleting the minus sign and waiting for the JkMountFile to reload.
+An exclusion can be disabled by prefixing it with a minus sign.
+</p>
+<div class="example"><pre>
+  # Sample uriworkermap.properties file
+
+  /servlets-examples/*=ajp13w
+  # Do not map .jpeg files
+  !/servlets-examples/*.jpeg=ajp13w
+  # Make jsp examples initially disabled  
+  -/jsp-examples/*=ajp13w
+</pre></div>
+<p>At run time you can change the content of this file. For example
+removing minus signs will enable the previously disabled uri mappings.
+You can add any number of new entries at runtime that reflects the newly deployed
+applications. Apache will reload the file and update the mount
+points within 60 second interval.
+</p>
+<p>
+There is no way to delete entries by dynamic reloading, but you can disable or
+exclude mappings.
+<br>
+<br>
+</p>
+
+</blockquote></td></tr></table>
+
+<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>
+<p>
+Alternatively to the mod_jk specific directives, you can also use
+SetHandler and environment variables to control, which requests
+are being forwarded via which worker. This gives you more flexibility,
+but the results might be more difficult to understand. If you mix both
+ways of defining the forwards, in general to mod_jk directives will win.
+</p>
+<p>
+<b>SetHandler jakarta-servlet</b> forces requests to be handled by mod_jk.
+If you neither specify any workers via JkMount and the related directives,
+not via the environment variable described below,
+the first worker in the list of all worker will be chosen. You can use SetHandler
+for example in Location blocks or with Apache 2.2 also in RewriteRule.
+</p>
+<p>
+In order to control the worker using <b>SetEnvIf</b> or <b>RewriteRule</b>
+for more complex rules, you can set the environment variable <b>JK_WORKER_NAME</b>
+to the name of your chosen target worker. This enables you to decide on
+the chosen worker in a more flexible way, including dependencies on cookie values.
+This feature has been added in version 1.2.19 of mod_jk. Furthermore you might
+append rule extensions to the worker name. The extensions are separated from the
+worker name by a semicolon ";" using the same syntax as in the
+uriworkermap.properties file. Supporting rule extensions in the worker name has
+been added in version 1.2.33.
+</p>
+<p>
+In order to use another variable than <b>JK_WORKER_NAME</b>, you can set the name
+of this variable via the <b>JkWorkerIndicator</b> directive.
+</p>
+<p>
+You can also define exclusions from mod_jk forwards by setting the environment
+variable <b>no-jk</b>.
+</p>
+<div class="example"><pre>
+  # Automatically map all encoded urls
+  &lt;Location *;jsessionid=&gt;
+    SetHandler jakarta-servlet
+    SetEnv JK_WORKER_NAME my_worker
+  &lt;/Location&gt;
+
+  # Map all subdirs to workers via naming rule
+  # and exclude static content.
+  &lt;Location /apps/&gt;
+    SetHandler jakarta-servlet
+    SetEnvIf REQUEST_URI ^/apps/([^/]*)/ JK_WORKER_NAME=$1
+    SetEnvIf REQUEST_URI ^/apps/([^/]*)/static no-jk
+  &lt;/Location&gt;
+</pre></div>
+</blockquote></td></tr></table>
+<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Advanced Environment Variables"><strong>Advanced Environment Variables</strong></a></font></td></tr><tr><td><blockquote>
+<p>
+Environment variables allow to overwrite the default behaviour
+of mod_jk depending on request properties like e.g. the request URI,
+header values or cookie. This can be done using the <b>SetEnvIf</b> or
+<b>RewriteRule</b> directives.
+</p>
+<p>
+The environment variable
+<b>JK_ROUTE</b> can be set to explicitely choose a member of a
+load balancer worker. The value must be equal to the
+route attribute of the member, or if that attribute is not
+used, equal to the member name. Note that this is only needed if
+session IDs and routes are encoded in a non standard way in the
+request. Stickyness using the Java Servlet compliant way of encoding
+the IDs is supported by default.
+This is available since version 1.2.33.
+</p>
+<p>
+The environment variable
+<b>JK_REPLY_TIMEOUT</b> can be set to dynamically define a reply timeout.
+The value must be given in milliseconds.
+This is available since version 1.2.27.
+</p>
+<p>
+The environment variable
+<b>JK_STICKY_IGNORE</b> can be set to disable session stickyness
+for individual requests. If the variable is set to an empty string
+or a nonzero number, session stickyness will be disabled. Setting
+it to <b>0</b> will reset to the behaviour defined by the worker
+configuration.
+This is available since version 1.2.33.
+</p>
+<p>
+This feature can be useful to optimize load balancing when using
+cookie based session stickyness. In this case, as long as she keeps
+her browser open, any request by a user who started a session will
+be send to the same Tomcat instance, even if he left the part of
+the application which uses the session. You can for instance
+set this environment variable when a user requests a login form
+to ensure, that this initial session request is balanced non-sticky.
+</p>
+<p>
+The environment variable
+<b>JK_STATELESS</b> can be used to improve load balancing
+for the session based balancing methods <b>Session</b> and
+<b>Next</b>.
+In this case normally any request which does not come with
+a session id counts as a new session. This can be problematic,
+if for instance static content is retrieved without a session id.
+If you set the environment variable <b>JK_STATELESS</b> for a request,
+then the request will not count as a new session, even if it does not
+come with a session id.
+This is available since version 1.2.33.
+</p>
+</blockquote></td></tr></table>
+ </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>
+        Copyright &copy; 1999-2012, Apache Software Foundation
+        </em></font></div></td></tr></table></body></html>
\ No newline at end of file

Propchange: tomcat/site/trunk/docs/connectors-doc/reference/printer/apache.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tomcat/site/trunk/docs/connectors-doc/reference/printer/iis.html
URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/connectors-doc/reference/printer/iis.html?rev=1307873&view=auto
==============================================================================
--- tomcat/site/trunk/docs/connectors-doc/reference/printer/iis.html (added)
+++ tomcat/site/trunk/docs/connectors-doc/reference/printer/iis.html Sat Mar 31 18:52:20 2012
@@ -0,0 +1,338 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>The Apache Tomcat Connector - Reference Guide - Configuring IIS</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 Software Foundation" 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%" cellspac
 ing="4"><tr><td align="left" valign="top"><h1>The Apache Tomcat Connector - Reference Guide</h1><h2>Configuring IIS</h2></td><td align="right" valign="top" nowrap="true"><img src="../../images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0" alt=" "></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="Requirements"><strong>Requirements</strong></a></font></td></tr><tr><td><blockquote>
+<p>
+The Tomcat redirector requires three entities:
+
+<ul>
+<li>
+<b>isapi_redirect.dll</b> - The IIS server plugin, either obtain a pre-built DLL or build it yourself (see the build section).
+</li>
+<li>
+<b>workers.properties</b> - A file that describes the host(s) and port(s) used by the workers (Tomcat processes). 
+A sample workers.properties can be found under the conf directory.
+</li>
+<li>
+<b>uriworkermap.properties</b> - A file that maps URL-Path patterns to workers. 
+A sample uriworkermap.properties can be found under the conf directory as well.
+</li>
+</ul>
+</p>
+
+<p>
+The installation includes the following parts:
+
+<ul>
+<li>
+Configuring the ISAPI redirector with a default /examples context and checking that you can serve servlets with IIS.
+</li>
+<li>
+Adding more contexts to the configuration.
+</li>
+</ul>
+</p>
+<p>
+Note that in a 64 Bit environment - at least for IIS 7 - the used IIS Application Pool
+should have "Enable 32-bit Applications" set to "False". Otherwise the redirector will
+not be called and returns an http code 404. If you think, the 32bit version of
+isapi_redirect.dll would do the job instead, you will get an http code 500,
+because the library is not loadable into a 64 Bit IIS.
+</p>
+</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="Registry settings"><strong>Registry settings</strong></a></font></td></tr><tr><td><blockquote>
+<p>
+ISAPI redirector reads configuration from the registry, create a new registry key named :
+</p>
+<p>
+<b>"HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0"</b>
+</p>
+<table border="1" cellpadding="5"><tr><th width="20%" bgcolor="#023264"><font color="#ffffff">Key Name</font></th><th width="80%" bgcolor="#023264"><font color="#ffffff">Description</font></th></tr><tr><td align="left" valign="center"><strong><code>extension_uri</code></strong></td><td align="left" valign="center"><p>
+A string value pointing to the ISAPI extension <b>/jakarta/isapi_redirect.dll</b>
+</p></td></tr><tr><td align="left" valign="center"><code>log_file</code></td><td align="left" valign="center"><p>
+A value pointing to location where log file will be created.
+(for example <b>c:\tomcat\logs\isapi.log</b>)
+<br>If one of the log rotation settings (<b>log_rotationtime</b> or <b>log_filesize</b>) are specified then the actual log file name is based on this setting.
+If the log file name includes any '%' characters, then it is treated as a format string for <b class="code">strftime(3)</b>, 
+e.g. <b>c:\tomcat\logs\isapi-%Y-%m-%d-%H_%M_%S.log</b>. Otherwise, the suffix <em>.nnnnnnnnnn</em> is automatically added and is the time in seconds.
+A full list of format string substitutions can be found in the <a href="http://httpd.apache.org/docs/2.0/programs/rotatelogs.html">Apache rotatelogs documentation</a>
+</p></td></tr><tr><td align="left" valign="center"><code>log_level</code></td><td align="left" valign="center"><p>
+A string value for log level 
+(can be debug, info, warn, error or trace).</p>
+<p>This directive was added in version 1.2.31</p>
+</td></tr><tr><td align="left" valign="center"><code>log_rotationtime</code></td><td align="left" valign="center"><p>
+The time between log file rotations in seconds.
+Setting this to 0 (the default) disables log rotation based on time.</p>
+<p>This directive was added in version 1.2.31</p>
+</td></tr><tr><td align="left" valign="center"><code>log_filesize</code></td><td align="left" valign="center"><p>
+The maximum log file size in megabytes, after which the log file will be rotated. Setting this to 0 (the default) disables log rotation based on file size.
+<br>The value can have an optional <b>M</b> suffix, i.e. both <b>5</b> and <b>5M</b> will rotate the log file when it grows to 5MB.
+<br>If <b>log_rotationtime</b> is specified, then this setting is ignored.  
+</p></td></tr><tr><td align="left" valign="center"><strong><code>worker_file</code></strong></td><td align="left" valign="center"><p>
+A string value which is the full path to workers.properties file
+(for example <b>c:\tomcat\conf\workers.properties</b>)
+</p></td></tr><tr><td align="left" valign="center"><strong><code>worker_mount_file</code></strong></td><td align="left" valign="center"><p>
+A string value which is the full path to uriworkermap.properties file
+(for example <b>c:\tomcat\conf\uriworkermap.properties</b>)
+</p></td></tr><tr><td align="left" valign="center"><code>rewrite_rule_file</code></td><td align="left" valign="center"><p>
+A string value which is the full path to rewrite.properties file
+(for example <b>c:\tomcat\conf\rewrite.properties</b>)
+</p></td></tr><tr><td align="left" valign="center"><code>shm_size</code></td><td align="left" valign="center"><p>
+A DWORD value size of the shared memory. Set this value to be
+the number of all defined workers * 400.
+(Set this value only if you have <b>more</b> then <b>64</b> workers)
+</p>
+<p>This directive has been added in version 1.2.20</p>
+<p>Starting with version 1.2.27 the size of the shared memory is determined
+automatically, even for large numbers of workers. This attribute is not
+needed any longer.</p>
+</td></tr><tr><td align="left" valign="center"><code>worker_mount_reload</code></td><td align="left" valign="center"><p>
+A DWORD value specifying the time in seconds upon which the
+<b>worker_mount_file</b> will be reloaded.
+</p>
+<p>This directive has been added in version 1.2.20</p>
+</td></tr><tr><td align="left" valign="center"><code>strip_session</code></td><td align="left" valign="center"><p>
+A string value representing a boolean. If it is set to true,
+URL session suffixes of the form ";jsessionid=..." get stripped of URLs,
+even if the are served locally by the web server.
+</p>
+<p>
+A true value can be represented by the string "1" or any string starting
+with the letters "T" or "t". A false value will be assumed for "0"
+or any string starting with "F" or "f". The default value is false.
+</p>
+<p>This directive has been added in version 1.2.21</p>
+</td></tr><tr><td align="left" valign="center"><code>auth_complete</code></td><td align="left" valign="center"><p>
+A DWORD value representing "0" or "1". This is needed because
+of minor incompatibilities with IIS 5.1.
+</p>
+<p>
+By default its value is 1, which means we use the SF_NOTIFY_AUTH_COMPLETE
+event. If you set this to 0, then we use SF_NOTIFY_PREPROC_HEADERS.
+This might be needed for IIS 5.1 when handling requests using the
+PUT HTTP method.
+</p>
+<p>This directive has been added in version 1.2.21</p>
+</td></tr><tr><td align="left" valign="center"><code>uri_select</code></td><td align="left" valign="center"><p>
+A string value which influences, how URIs are decoded and re-encoded
+between IIS and Tomcat. You should leave this at it's default value,
+unless you have a very good reason to change it.
+</p>
+<p>
+If the value is "parsed", the forwarded URI
+will be decoded and explicit path components like ".." will already
+be resolved. This is less spec compliant and is <b>not safe</b>
+if you are using prefix forwarding rules.
+</p>
+<p>
+If the value is "unparsed", the forwarded URI
+will be the original request URI. It's spec compliant and also
+the safest option. Rewriting the URI and then forwarding the rewritten
+URI will not work.
+</p>
+<p>
+If the value is "escaped", the forwarded URI
+will be the re-encoded form of the URI used by "parsed".
+Explicit path components like ".." will already be resolved.
+This will not work in combination with URL encoded session IDs.
+</p>
+<p>
+If the value is "proxy", the forwarded URI
+will be a partially re-encoded form of the URI used by "parsed".
+Explicit path components like ".." will already be resolved.
+and problematic are re-encoded.
+</p>
+<p>The default value since version 1.2.24 is "proxy". Before it was "parsed".</p>
+</td></tr><tr><td align="left" valign="center"><code>reject_unsafe</code></td><td align="left" valign="center"><p>
+A string value representing a boolean. If it is set to true,
+URLs containing percent signs '%' or backslashes '\'
+after decoding will be rejected.
+</p>
+<p>
+Most web apps do not use such URLs. By enabling "reject_unsafe" you
+can block several well known URL encoding attacks.
+</p>
+<p>
+A true value can be represented by the string "1" or any string starting
+with the letters "T" or "t". A false value will be assumed for "0"
+or any string starting with "F" or "f". The default value is false.
+</p>
+<p>This directive has been added in version 1.2.24</p>
+</td></tr><tr><td align="left" valign="center"><code>watchdog_interval</code></td><td align="left" valign="center"><p>
+A DWORD value representing the watchdog thread interval in seconds.
+The workers are maintained periodically by a background thread
+running periodically every watchdog_interval seconds. Worker maintenance
+checks for idle connections, corrects load status and is able
+to detect backend health status.
+</p>
+<p>
+The maintenance only happens, if since the last maintenance at
+least <a href="workers.html"><b class="code">worker.maintain</b></a>
+seconds have passed. So setting the watchdog_interval
+much smaller than <b class="code">worker.maintain</b> is not useful.
+</p>
+<p>
+The default value is 0 seconds, meaning the watchdog thread
+will not be created, and the maintenance is done in combination
+with normal requests instead.
+</p>
+<p>This directive has been added in version 1.2.27</p>
+</td></tr><tr><td align="left" valign="center"><code>error_page</code></td><td align="left" valign="center"><p>
+A string value representing the error page url redirection when
+backend returns non-200 response. This directive can be used
+to customise the error messages returned from backend server.
+</p>
+<p>The url must point to a valid server url and can contain
+format string number <b class="code">(%d)</b> that can be used to
+separate the pages by error number. The redirect url in that
+case is formatted by replacing <b class="code">%d</b> from
+<b class="code">error_page</b> to returned error number.
+</p>
+<p>This directive has been added in version 1.2.27</p>
+</td></tr><tr><td align="left" valign="center"><code>enable_chunked_encoding</code></td><td align="left" valign="center"><p>
+A string value representing a boolean. If it is set to true,
+chunked encoding is supported by the server.
+</p>
+<p>
+A true value can be represented by the string "1" or any string starting
+with the letters "T" or "t". A false value will be assumed for "0"
+or any string starting with "F" or "f". The default value is false.
+</p>
+<p><font color="#ff0000">This option is considered experimental and its support
+must be compile time enabled. Use <b class="code">isapi_redirect.dll</b>
+with chunked support enabled.
+</font></p>
+<p>This directive has been added in version 1.2.27</p>
+</td></tr></table>
+</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="Using a properties file for configuration"><strong>Using a properties file for configuration</strong></a></font></td></tr><tr><td><blockquote>
+<p>
+The ISAPI redirector can read it's configuration from a properties file instead of the registry. 
+This has the advantage that you can use multiple ISAPI redirectors with independent configurations on the same server.
+The redirector will check for the properties file during initialisation, and use it in preference to the registry if present.
+</p>
+<p>
+Create a properties file in the same directory as the ISAPI redirector called <b>isapi_redirect.properties</b> i.e. with the same name as the ISAPI redirector DLL but with a <em>.properties</em> extension. A sample isapi_redirect.properties can be found under the conf directory.
+</p>
+<p>
+The property names and values in the properties file are the same as for the registry settings described above. For example:
+</p>
+<p>
+<div class="example"><pre>
+# Configuration file for the Jakarta ISAPI Redirector
+
+# The path to the ISAPI Redirector Extension, relative to the website
+# This must be in a virtual directory with execute privileges
+extension_uri=/jakarta/isapi_redirect.dll
+
+# Full path to the log file for the ISAPI Redirector
+log_file=c:\tomcat\logs\isapi_redirect.log
+
+# Log level (debug, info, warn, error or trace)
+log_level=info
+
+# Full path to the workers.properties file
+worker_file=c:\tomcat\conf\workers.properties
+
+# Full path to the uriworkermap.properties file
+worker_mount_file=c:\tomcat\conf\uriworkermap.properties
+</pre></div>
+</p>
+<p>
+    Notes: 
+    <ul>
+        <li>
+            Back-slashes - '\' - are not escape characters.
+        </li>
+        <li>
+            Comment lines begin with '#'.
+        </li>
+    </ul>
+</p>
+<p>Starting with version 1.2.27 two environment variables are
+dynamically added to the environment that can be used inside
+<b class="code">.properties</b> files.
+    <ul>
+        <li>JKISAPI_PATH - Full path to the ISAPI Redirector.
+        </li>
+        <li>JKISAPI_NAME - Name of the ISAPI Redirector dll without extension
+        </li>
+    </ul>    
+</p>
+<p><div class="example"><pre>
+# Use the logs in the installation path of ISAPI Redirector
+log_file=$(ISAPI_PATH)\$(ISAPI_NAME).log
+</pre></div></p>
+</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="Log file rotation"><strong>Log file rotation</strong></a></font></td></tr><tr><td><blockquote>
+<p>
+The ISAPI redirector with version 1.2.31 can perform log rotation, with configuration and behaviour similar to the 
+<a href="http://httpd.apache.org/docs/2.0/programs/rotatelogs.html">rotatelogs</a> program provided with Apache HTTP Server.
+</p>
+<p>
+To configure log rotation, configure a <b>log_file</b>, and one of the <b>log_rotationtime</b> or <b>log_filesize</b> options.
+If both are specified, the <b>log_rotationtime</b> will take precedence, and <b>log_filesize</b> will be ignored. 
+<br>For example, to configure daily rotation of the log file:
+</p>
+<div class="example"><pre>
+# Configuration file for the Jakarta ISAPI Redirector
+...
+
+# Full path to the log file for the ISAPI Redirector
+log_file=c:\tomcat\logs\isapi_redirect.%Y-%m-%d.log
+
+# Log level (debug, info, warn, error or trace)
+log_level=info
+
+# Rotate the log file every day
+log_rotationtime=86400
+
+...
+</pre></div>
+<p>
+Or to configure rotation of the log file when it reaches 5MB in size:
+</p>
+<div class="example"><pre>
+# Configuration file for the Jakarta ISAPI Redirector
+...
+
+# Full path to the log file for the ISAPI Redirector
+log_file=c:\tomcat\logs\isapi_redirect.%Y-%m-%d-%H.log
+
+# Log level (debug, info, warn, error or trace)
+log_level=info
+
+# Rotate the log file at 5 MB
+log_filesize=5M
+
+...
+</pre></div>
+<p>
+The log will be rotated whenever the configured limit is reached, but only if the log file name would change. If you configure
+ a log file name with <b class="code">strftime(3)</b> format codes in it, then ensure it specifies the same granularity
+ as the rotation time configured, e.g. <b>%Y-%m-%d</b> if rotating daily (<b>log_rotationtime=86400</b>).
+<br>See the <a href="http://httpd.apache.org/docs/2.0/programs/rotatelogs.html">rotatelogs</a> documentation for more examples.
+</p>
+
+</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="Using a simple rewrite rules"><strong>Using a simple rewrite rules</strong></a></font></td></tr><tr><td><blockquote>
+<p>
+The ISAPI redirector with version 1.2.16 can do a simple URL rewriting. Although not
+as powerful as Apache Httpd's mod_rewrite, it allows a simple exchange of request URIs
+</p>
+<p>
+The rule is in the form original-url-prefix=forward-url-prefix. For example:
+</p>
+<div class="example"><pre>
+# Simple rewrite rules, making /jsp-examples
+# and /servlets-examples available under shorter URLs
+/jsp/=/jsp-examples/
+/servlets/=/servlets-examples/
+</pre></div>
+<p>
+You can also use regular expressions, if you prefix the rule with a tilde <b class="code">~</b>:
+</p>
+<div class="example"><pre>
+# Complex rewrite rule, adding "-examples"
+# to the first path component of all requests
+~/([^/]*)=/$1-examples
+</pre></div>
+<p>
+Note that uriworkermap.properties must use the URLs before rewriting.
+</p>
+</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>
+        Copyright &copy; 1999-2012, Apache Software Foundation
+        </em></font></div></td></tr></table></body></html>
\ No newline at end of file

Propchange: tomcat/site/trunk/docs/connectors-doc/reference/printer/iis.html
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org