Modified: tomcat/site/trunk/docs/connectors-doc/reference/apache.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/connectors-doc/reference/apache.html?rev=1696233&r1=1696232&r2=1696233&view=diff ============================================================================== --- tomcat/site/trunk/docs/connectors-doc/reference/apache.html (original) +++ tomcat/site/trunk/docs/connectors-doc/reference/apache.html Mon Aug 17 10:48:16 2015 @@ -1,4 +1,4 @@ -<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="mt...@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><!--LEFT SIDE NAVIGATION--><td width="20%" valign="top" nowrap="true"><p><strong>Links</strong></p><ul><li><a href="../ index.html">Docs Home</a></li></ul><p><strong>Reference Guide</strong></p><ul><li><a href="../reference/workers.html">workers.properties</a></li><li><a href="../reference/uriworkermap.html">uriworkermap.properties</a></li><li><a href="../reference/status.html">Status Worker</a></li><li><a href="../reference/apache.html">Apache HTTP Server</a></li><li><a href="../reference/iis.html">IIS</a></li></ul><p><strong>Generic HowTo</strong></p><ul><li><a href="../generic_howto/quick.html">For the impatient</a></li><li><a href="../generic_howto/workers.html">All about workers</a></li><li><a href="../generic_howto/timeouts.html">Timeouts</a></li><li><a href="../generic_howto/loadbalancers.html">Load Balancing</a></li><li><a href="../generic_howto/proxy.html">Reverse Proxy</a></li></ul><p><strong>Webserver HowTo</strong></p><ul><li><a href="../webserver_howto/apache.html">Apache HTTP Server</a></li><li><a href="../webserver_howto/iis.html">IIS</a></li><li><a href="../webserver_howto/nes.html">N etscape/SunOne/Sun</a></li></ul><p><strong>AJP Protocol Reference</strong></p><ul><li><a href="../ajp/ajpv13a.html">AJPv13</a></li><li><a href="../ajp/ajpv13ext.html">AJPv13 Extension Proposal</a></li></ul><p><strong>Miscellaneous Documentation</strong></p><ul><li><a href="../miscellaneous/faq.html">Frequently asked questions</a></li><li><a href="../miscellaneous/changelog.html">Changelog</a></li><li><a href="http://issues.apache.org/bugzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&product=Tomcat+Connectors&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&keywords_type=allwords&keywords=&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfi eldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=">Current Tomcat Connectors bugs</a></li><li><a href="../miscellaneous/doccontrib.html">Contribute documentation</a></li><li><a href="../miscellaneous/jkstatustasks.html">JK Status Ant Tasks</a></li><li><a href="../miscellaneous/reporttools.html">Reporting Tools</a></li><li><a href="http://tomcat.apache.org/connectors-doc-archive/jk2/index.html">Old JK/JK2 documentation</a></li></ul><p><strong>News</strong></p><ul><li><a href="../news/20140201.html">2014</a></li><li><a href="../news/20120301.html">2012</a></li><li><a href="../news/20110701.html">2011</a></li><li><a href="../news/20100101.html">2010</a></li><li><a href="../news/20090301.html">2009</a></li><li><a href="../news/20081001.html">2008</a></li><li><a href="../news/20070301.html">2007</a></li><li><a href="../news/20060101.html">2006</a></li><li><a href="../news/20050101.html">2005</a></li> <li><a href="../news/20041100.html">2004</a></li></ul></td><!--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"><small><a href="printer/apache.html"><img src="../images/printer.gif" border="0" alt="Printer Friendly Version"><br>print-friendly<br>version +<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>The Apache Tomcat Connectors - Reference Guide - Configuring Apache</title><meta name="author" value="Mladen Turk"><meta name="email" value="mt...@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><!--LEFT SIDE NAVIGATION--><td width="20%" valign="top" nowrap="true"><p><strong>Links</strong></p><ul><li><a href=".. /index.html">Docs Home</a></li></ul><p><strong>Common HowTo</strong></p><ul><li><a href="../common_howto/quick.html">For the impatient</a></li><li><a href="../common_howto/workers.html">All about workers</a></li><li><a href="../common_howto/timeouts.html">Timeouts</a></li><li><a href="../common_howto/loadbalancers.html">Load Balancing</a></li><li><a href="../common_howto/proxy.html">Reverse Proxy</a></li></ul><p><strong>Webserver HowTo</strong></p><ul><li><a href="../webserver_howto/apache.html">Apache HTTP Server</a></li><li><a href="../webserver_howto/iis.html">IIS</a></li><li><a href="../webserver_howto/nes.html">Netscape/SunOne/Sun</a></li></ul><p><strong>Reference Guide</strong></p><ul><li><a href="../reference/workers.html">workers.properties</a></li><li><a href="../reference/uriworkermap.html">uriworkermap.properties</a></li><li><a href="../reference/status.html">Status Worker</a></li><li><a href="../reference/apache.html">Apache HTTP Server</a></li><li><a href="../reference/ iis.html">IIS</a></li></ul><p><strong>AJP Protocol Reference</strong></p><ul><li><a href="../ajp/ajpv13a.html">AJPv13</a></li><li><a href="../ajp/ajpv13ext.html">AJPv13 Extension Proposal</a></li></ul><p><strong>Miscellaneous Documentation</strong></p><ul><li><a href="../miscellaneous/faq.html">Frequently asked questions</a></li><li><a href="../miscellaneous/changelog.html">Changelog</a></li><li><a href="http://issues.apache.org/bugzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&product=Tomcat+Connectors&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&keywords_type=allwords&keywords=&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto =Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=">Current Tomcat Connectors bugs</a></li><li><a href="../miscellaneous/doccontrib.html">Contribute documentation</a></li><li><a href="../miscellaneous/jkstatustasks.html">JK Status Ant Tasks</a></li><li><a href="../miscellaneous/reporttools.html">Reporting Tools</a></li><li><a href="http://tomcat.apache.org/connectors-doc-archive/jk2/index.html">Old JK/JK2 documentation</a></li></ul><p><strong>News</strong></p><ul><li><a href="../news/20140201.html">2014</a></li><li><a href="../news/20120301.html">2012</a></li><li><a href="../news/20110701.html">2011</a></li><li><a href="../news/20100101.html">2010</a></li><li><a href="../news/20090301.html">2009</a></li><li><a href="../news/20081001.html">2008</a></li><li><a href="../news/20070301.html">2007</a></li><li><a href="../news/20060101.html">2006</a></li><li><a href="../news/20050101.html">2005</a></li><li>< a href="../news/20041100.html">2004</a></li></ul></td><!--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 Connectors - Reference Guide</h1><h2>Configuring Apache</h2></td><td align="right" valign="top" nowrap="true"><small><a href="printer/apache.html"><img src="../images/printer.gif" border="0" alt="Printer Friendly Version"><br>print-friendly<br>version </a></small></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 @@ -98,9 +98,14 @@ A mount point from a context to a Tomcat <br> This directive is allowed multiple times. It is allowed in the global configuration and in VirtualHost. +<br> 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. +which gets inherited verbatim from the Location argument. +Whereas <Location /myapp> matches any URI beginning with +"/myapp", any JkMount nested in such a Location block will +only match for requests with exact URI /myapp. Therefore nesting +JkMount in Location is typically not the right thing to do. <br> By default JkMount entries are not inherited from the global server to other VirtualHosts or between VirtualHosts. @@ -118,9 +123,15 @@ it will not be forwarded to tomcat, and <br> This directive is allowed multiple times. It is allowed in the global configuration and in VirtualHost. +<br> 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. +which gets inherited verbatim from the Location argument. +Whereas <Location /myapp> matches any URI beginning with +"/myapp", any JkUnMount nested in such a Location block will +only match for requests with exact URI /myapp. Therefore nesting +JkUnMount in Location is typically not the right thing to do. +<br> For inheritance rules, see: JkMountCopy. <br> This directive is available in jk1.2.7 version and later. @@ -185,7 +196,7 @@ This directive has been added in version 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. +Full or server relative path to the mod_jk log file. It will also work with pipe, by using a value of the form "| ...". <br> The default value is logs/mod_jk.log. @@ -193,12 +204,12 @@ The default value is logs/mod_jk.log. 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 +The mod_jk 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 +The mod_jk <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. @@ -262,6 +273,14 @@ to add <b class="code">SSLOptions +Expor </tr> </table> <p> + In addition mod_jk sends the name of the SSL protocol used as a proprietary + request attribute named <b class="code">AJP_SSL_PROTOCOL</b>. Modern Tomcat + versions will expose this attribute under the name + <b class="code">org.apache.tomcat.util.net.secure_protocol_version</b>. + This feature has been added in version 1.2.41 of mod_jk. See also + JkSSLPROTOCOLIndicator. +</p> +<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 @@ -271,6 +290,12 @@ to add <b class="code">SSLOptions +Expor 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>JkSSLPROTOCOLIndicator</code></td><td align="left" valign="center"><p> +Name of the Apache environment variable that contains the SSL protocol name. +<br> +The default value is "SSL_PROTOCOL". +<br> +This directive has been added in version 1.2.41 of mod_jk. </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> @@ -295,16 +320,34 @@ The default value is "SSL_CIPHER_USEKEYS 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). +<a href="../common_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>JkIgnoreCLIndicator</code></td><td align="left" valign="center"><p> +Name of the Apache environment variable which forces to +ignore an existing Content-Length request header. This can be +used to make mod_jk conpatible with mod_deflate request body +inflation (see <a href="#Advanced Environment Variables">below</a>). +<br> +The default value is "JK_IGNORE_CL". +<br> +This directive has been added in version 1.2.41 of mod_jk. +</p></td></tr><tr><td align="left" valign="center"><code>JkLocalAddrIndicator</code></td><td align="left" valign="center"><p> +Name of the Apache environment variable which can be used to overwrite +the forwarded local IP address. +Use this only if you need to adjust the data (see the +<a href="../common_howto/proxy.html">proxy</a> documentation). +<br> +The default value is "JK_LOCAL_ADDR". +<br> +This directive has been added in version 1.2.41 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). +<a href="../common_howto/proxy.html">proxy</a> documentation). <br> The default value is "JK_LOCAL_PORT". <br> @@ -313,7 +356,7 @@ This directive has been added in version 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). +<a href="../common_howto/proxy.html">proxy</a> documentation). <br> The default value is "JK_REMOTE_HOST". <br> @@ -322,7 +365,7 @@ This directive has been added in version 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). +<a href="../common_howto/proxy.html">proxy</a> documentation). <br> The default value is "JK_REMOTE_ADDR". <br> @@ -331,7 +374,7 @@ This directive has been added in version 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). +<a href="../common_howto/proxy.html">proxy</a> documentation). <br> The default value is "JK_REMOTE_PORT". <br> @@ -340,7 +383,7 @@ This directive has been added in version 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). +<a href="../common_howto/proxy.html">proxy</a> documentation). <br> The default value is "JK_REMOTE_USER". <br> @@ -349,7 +392,7 @@ This directive has been added in version 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). +<a href="../common_howto/proxy.html">proxy</a> documentation). <br> The default value is "JK_AUTH_TYPE". <br> @@ -385,7 +428,8 @@ 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. +removed for URLs which are not forwarded but instead are +handled by the local server. <br> This directive is only allowed inside VirtualHost. <br> @@ -470,12 +514,11 @@ set the log level between : <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> +See above for details. </p> <div class="example"><pre> - JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " + JkLogStampFormat "[%Y-%m-%d %H:%M:%S.%Q] " </pre></div> <p> @@ -484,18 +527,20 @@ default to <b>"[%a %b %d %H:%M:%S %Y]"</ </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: +You can 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">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> +<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" va lign="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><t r><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: Error count for the last wo rker 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> - JkRequestLogFormat "%w %V %T" + LogFormat "%h %l %u %t \"%r\" %>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> @@ -503,20 +548,20 @@ here is a list of the available request </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. +You can also log a request protocol in the mod_jk log file instead of +the access log. This is not recommended and mostly a backward compatibility +feature. The directive <b>JkRequestLogFormat</b> will configure the format +of this protocol. It gets 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">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" va lign="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><t r><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: Error count for the last wo rker 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> +<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> <div class="example"><pre> - LogFormat "%h %l %u %t \"%r\" %>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 + JkRequestLogFormat "%w %V %T" </pre></div> <br> @@ -642,6 +687,40 @@ but also slightly more complicated. </p> <p> +JkOptions <b>CollapseSlashesAll</b> will collapse multiple +adjacent slashes in request URLs before looking for mount or unmount +matches. +<div class="example"><pre> + JkOptions +CollapseSlashesAll +</pre></div> +<br> +<br> +</p> + +<p> +JkOptions <b>CollapseSlashesUnmount</b> will collapse multiple +adjacent slashes in request URLs only before looking for unmount +matches. This is the default value. +<div class="example"><pre> + JkOptions +CollapseSlashesUnmount +</pre></div> +<br> +<br> +</p> + +<p> +JkOptions <b>CollapseSlashesNone</b> will never collapse multiple +adjacent slashes in request URLs before looking for mount or unmount +matches. Using this value might make you vulnerable for attacks +bypassing your unmount rules. +<div class="example"><pre> + JkOptions +CollapseSlashesNone +</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) @@ -656,14 +735,14 @@ local file that matches (this is done by </p> <p> -If ForwardDirectories is set to false (default) and Apache doesn't find any +If ForwardDirectories is set to <b>false</b> (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 +If ForwardDirectories is set to <b>true</b> 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 @@ -1079,7 +1158,30 @@ then the request will not count as a new come with a session id. This is available since version 1.2.33. </p> +<p> +The environment variable +<b>JK_IGNORE_CL</b> can be set to force ignoring the request +Content-Length header (if it exists). mod_jk will then stream +the request body until the web server indicates that the full body +was read. No Content-Length header will be send to the backend. +This is available since version 1.2.41. +</p> +<p> +This feature can be used to make mod_jk compatible with filters +which change the size of the request body. One such filter is +mod_deflate when used to inflate the body of a request with gzip +encoded body. In this case mod_jk will by default forward a truncated +body, because it gets the wrong body size from the web server. +Telling mod_jk to ignore the Content-Length header will result +in streaming all request body data it can read from the web server +to the backend. +</p> +<p> +You should only set the <b>JK_IGNORE_CL</b> environment variables +for requests that actually need it. Unfortunately there's no way +for mod_jk to detect the need automatically. +</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 © 1999-2014, Apache Software Foundation + Copyright © 1999-2015, Apache Software Foundation </em></font></div></td></tr></table></body></html> \ No newline at end of file
Modified: tomcat/site/trunk/docs/connectors-doc/reference/iis.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/connectors-doc/reference/iis.html?rev=1696233&r1=1696232&r2=1696233&view=diff ============================================================================== --- tomcat/site/trunk/docs/connectors-doc/reference/iis.html (original) +++ tomcat/site/trunk/docs/connectors-doc/reference/iis.html Mon Aug 17 10:48:16 2015 @@ -1,4 +1,4 @@ -<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="mt...@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><!--LEFT SIDE NAVIGATION--><td width="20%" valign="top" nowrap="true"><p><strong>Links</strong></p><ul><li><a href="../ind ex.html">Docs Home</a></li></ul><p><strong>Reference Guide</strong></p><ul><li><a href="../reference/workers.html">workers.properties</a></li><li><a href="../reference/uriworkermap.html">uriworkermap.properties</a></li><li><a href="../reference/status.html">Status Worker</a></li><li><a href="../reference/apache.html">Apache HTTP Server</a></li><li><a href="../reference/iis.html">IIS</a></li></ul><p><strong>Generic HowTo</strong></p><ul><li><a href="../generic_howto/quick.html">For the impatient</a></li><li><a href="../generic_howto/workers.html">All about workers</a></li><li><a href="../generic_howto/timeouts.html">Timeouts</a></li><li><a href="../generic_howto/loadbalancers.html">Load Balancing</a></li><li><a href="../generic_howto/proxy.html">Reverse Proxy</a></li></ul><p><strong>Webserver HowTo</strong></p><ul><li><a href="../webserver_howto/apache.html">Apache HTTP Server</a></li><li><a href="../webserver_howto/iis.html">IIS</a></li><li><a href="../webserver_howto/nes.html">Nets cape/SunOne/Sun</a></li></ul><p><strong>AJP Protocol Reference</strong></p><ul><li><a href="../ajp/ajpv13a.html">AJPv13</a></li><li><a href="../ajp/ajpv13ext.html">AJPv13 Extension Proposal</a></li></ul><p><strong>Miscellaneous Documentation</strong></p><ul><li><a href="../miscellaneous/faq.html">Frequently asked questions</a></li><li><a href="../miscellaneous/changelog.html">Changelog</a></li><li><a href="http://issues.apache.org/bugzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&product=Tomcat+Connectors&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&keywords_type=allwords&keywords=&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfield to=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=">Current Tomcat Connectors bugs</a></li><li><a href="../miscellaneous/doccontrib.html">Contribute documentation</a></li><li><a href="../miscellaneous/jkstatustasks.html">JK Status Ant Tasks</a></li><li><a href="../miscellaneous/reporttools.html">Reporting Tools</a></li><li><a href="http://tomcat.apache.org/connectors-doc-archive/jk2/index.html">Old JK/JK2 documentation</a></li></ul><p><strong>News</strong></p><ul><li><a href="../news/20140201.html">2014</a></li><li><a href="../news/20120301.html">2012</a></li><li><a href="../news/20110701.html">2011</a></li><li><a href="../news/20100101.html">2010</a></li><li><a href="../news/20090301.html">2009</a></li><li><a href="../news/20081001.html">2008</a></li><li><a href="../news/20070301.html">2007</a></li><li><a href="../news/20060101.html">2006</a></li><li><a href="../news/20050101.html">2005</a></li><li ><a href="../news/20041100.html">2004</a></li></ul></td><!--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 IIS</h2></td><td >align="right" valign="top" nowrap="true"><small><a >href="printer/iis.html"><img src="../images/printer.gif" border="0" >alt="Printer Friendly Version"><br>print-friendly<br>version +<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>The Apache Tomcat Connectors - Reference Guide - Configuring IIS</title><meta name="author" value="Mladen Turk"><meta name="email" value="mt...@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><!--LEFT SIDE NAVIGATION--><td width="20%" valign="top" nowrap="true"><p><strong>Links</strong></p><ul><li><a href="../in dex.html">Docs Home</a></li></ul><p><strong>Common HowTo</strong></p><ul><li><a href="../common_howto/quick.html">For the impatient</a></li><li><a href="../common_howto/workers.html">All about workers</a></li><li><a href="../common_howto/timeouts.html">Timeouts</a></li><li><a href="../common_howto/loadbalancers.html">Load Balancing</a></li><li><a href="../common_howto/proxy.html">Reverse Proxy</a></li></ul><p><strong>Webserver HowTo</strong></p><ul><li><a href="../webserver_howto/apache.html">Apache HTTP Server</a></li><li><a href="../webserver_howto/iis.html">IIS</a></li><li><a href="../webserver_howto/nes.html">Netscape/SunOne/Sun</a></li></ul><p><strong>Reference Guide</strong></p><ul><li><a href="../reference/workers.html">workers.properties</a></li><li><a href="../reference/uriworkermap.html">uriworkermap.properties</a></li><li><a href="../reference/status.html">Status Worker</a></li><li><a href="../reference/apache.html">Apache HTTP Server</a></li><li><a href="../reference/iis .html">IIS</a></li></ul><p><strong>AJP Protocol Reference</strong></p><ul><li><a href="../ajp/ajpv13a.html">AJPv13</a></li><li><a href="../ajp/ajpv13ext.html">AJPv13 Extension Proposal</a></li></ul><p><strong>Miscellaneous Documentation</strong></p><ul><li><a href="../miscellaneous/faq.html">Frequently asked questions</a></li><li><a href="../miscellaneous/changelog.html">Changelog</a></li><li><a href="http://issues.apache.org/bugzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&product=Tomcat+Connectors&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&keywords_type=allwords&keywords=&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=No w&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=">Current Tomcat Connectors bugs</a></li><li><a href="../miscellaneous/doccontrib.html">Contribute documentation</a></li><li><a href="../miscellaneous/jkstatustasks.html">JK Status Ant Tasks</a></li><li><a href="../miscellaneous/reporttools.html">Reporting Tools</a></li><li><a href="http://tomcat.apache.org/connectors-doc-archive/jk2/index.html">Old JK/JK2 documentation</a></li></ul><p><strong>News</strong></p><ul><li><a href="../news/20140201.html">2014</a></li><li><a href="../news/20120301.html">2012</a></li><li><a href="../news/20110701.html">2011</a></li><li><a href="../news/20100101.html">2010</a></li><li><a href="../news/20090301.html">2009</a></li><li><a href="../news/20081001.html">2008</a></li><li><a href="../news/20070301.html">2007</a></li><li><a href="../news/20060101.html">2006</a></li><li><a href="../news/20050101.html">2005</a></li><li><a h ref="../news/20041100.html">2004</a></li></ul></td><!--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 Connectors - Reference Guide</h1><h2>Configuring IIS</h2></td><td align="right" valign="top" nowrap="true"><small><a href="printer/iis.html"><img src="../images/printer.gif" border="0" alt="Printer Friendly Version"><br>print-friendly<br>version </a></small></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: @@ -44,6 +44,15 @@ ISAPI redirector reads configuration fro <p> <b>"HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0"</b> </p> +<p> +Attributes described below as a "string value representing a boolean" +can be set either using the numbers <b>0</b> (false) and <b>1</b> (true) +as values, or <b>off</b> (false) and <b>on</b> (true) or any other string +starting with the letters <b>f</b> (false), <b>n</b> (false), +<b>t</b> (true) or <b>y</b> (true). +The values are taken case insensitive. In this documentation we will stick +to <b>false</b> and <b>true</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> @@ -89,14 +98,12 @@ A DWORD value specifying the time in sec </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. +A string value representing a boolean. If it is set to <b>true</b>, +URL session suffixes of the form ";jsessionid=..." get stripped of +URLs, 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. +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> @@ -141,20 +148,35 @@ 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 '\' +A string value representing a boolean. If it is set to <b>true</b>, +URLs still 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 +Most web apps do not use such URLs. By enabling <b>reject_unsafe</b> 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. +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>collapse_slashes</code></td><td align="left" valign="center"><p> +One of the string values "all", "none" or "unmount". +It controls whether multiple adjacent slashes in request URLs are +collapsed before looking for a mount or unmount match. +</p> +<p> +Value "all" will result in collapsing before mount and unmount +checks, value "none" will result in never collapsing, value +"unmount" will check mount rules without collapsing but unmount +with collapsing. +</p> +<p> +Before version 1.2.41 collapsing was never done. Starting with +version 1.2.41 collapsing before looking for unmount matches +is the default to prevent easy bypassing of unmount rules. +</p> +<p>This directive has been added in version 1.2.41</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 @@ -187,13 +209,11 @@ case is formatted by replacing <b class= </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, +A string value representing a boolean. If it is set to <b>true</b>, 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. +The default value is false. </p> <p>This directive has been added in version 1.2.27. Until version 1.2.30 it was considered experimental and only available when a special build containing @@ -207,14 +227,16 @@ This has the advantage that you can use 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. +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 +# Configuration file for the Tomcat ISAPI Redirector # The path to the ISAPI Redirector Extension, relative to the website # This must be in a virtual directory with execute privileges @@ -245,7 +267,7 @@ worker_mount_file=c:\tomcat\conf\uriwork </ul> </p> <p>Starting with version 1.2.27 two environment variables are -dynamically added to the environment that can be used inside +automatically 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. @@ -256,7 +278,7 @@ dynamically added to the environment tha </p> <p><div class="example"><pre> # Use the logs in the installation path of ISAPI Redirector -log_file=$(ISAPI_PATH)\$(ISAPI_NAME).log +log_file=$(JKISAPI_PATH)\$(JKISAPI_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> @@ -269,7 +291,7 @@ If both are specified, the <b>log_rotati <br>For example, to configure daily rotation of the log file: </p> <div class="example"><pre> -# Configuration file for the Jakarta ISAPI Redirector +# Configuration file for the Tomcat ISAPI Redirector ... # Full path to the log file for the ISAPI Redirector @@ -287,7 +309,7 @@ log_rotationtime=86400 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 +# Configuration file for the Tomcat ISAPI Redirector ... # Full path to the log file for the ISAPI Redirector @@ -334,5 +356,5 @@ You can also use regular expressions, if 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 © 1999-2014, Apache Software Foundation + Copyright © 1999-2015, Apache Software Foundation </em></font></div></td></tr></table></body></html> \ No newline at end of file Modified: 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=1696233&r1=1696232&r2=1696233&view=diff ============================================================================== --- tomcat/site/trunk/docs/connectors-doc/reference/printer/apache.html (original) +++ tomcat/site/trunk/docs/connectors-doc/reference/printer/apache.html Mon Aug 17 10:48:16 2015 @@ -1,4 +1,4 @@ -<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="mt...@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%" 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" 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> +<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>The Apache Tomcat Connectors - Reference Guide - Configuring Apache</title><meta name="author" value="Mladen Turk"><meta name="email" value="mt...@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%" cellspacing= "4"><tr><td align="left" valign="top"><h1>The Apache Tomcat Connectors - 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 <VirtualHost> elements. Exceptions from this rule are @@ -97,9 +97,14 @@ A mount point from a context to a Tomcat <br> This directive is allowed multiple times. It is allowed in the global configuration and in VirtualHost. +<br> 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. +which gets inherited verbatim from the Location argument. +Whereas <Location /myapp> matches any URI beginning with +"/myapp", any JkMount nested in such a Location block will +only match for requests with exact URI /myapp. Therefore nesting +JkMount in Location is typically not the right thing to do. <br> By default JkMount entries are not inherited from the global server to other VirtualHosts or between VirtualHosts. @@ -117,9 +122,15 @@ it will not be forwarded to tomcat, and <br> This directive is allowed multiple times. It is allowed in the global configuration and in VirtualHost. +<br> 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. +which gets inherited verbatim from the Location argument. +Whereas <Location /myapp> matches any URI beginning with +"/myapp", any JkUnMount nested in such a Location block will +only match for requests with exact URI /myapp. Therefore nesting +JkUnMount in Location is typically not the right thing to do. +<br> For inheritance rules, see: JkMountCopy. <br> This directive is available in jk1.2.7 version and later. @@ -184,7 +195,7 @@ This directive has been added in version 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. +Full or server relative path to the mod_jk log file. It will also work with pipe, by using a value of the form "| ...". <br> The default value is logs/mod_jk.log. @@ -192,12 +203,12 @@ The default value is logs/mod_jk.log. 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 +The mod_jk 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 +The mod_jk <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. @@ -261,6 +272,14 @@ to add <b class="code">SSLOptions +Expor </tr> </table> <p> + In addition mod_jk sends the name of the SSL protocol used as a proprietary + request attribute named <b class="code">AJP_SSL_PROTOCOL</b>. Modern Tomcat + versions will expose this attribute under the name + <b class="code">org.apache.tomcat.util.net.secure_protocol_version</b>. + This feature has been added in version 1.2.41 of mod_jk. See also + JkSSLPROTOCOLIndicator. +</p> +<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 @@ -270,6 +289,12 @@ to add <b class="code">SSLOptions +Expor 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>JkSSLPROTOCOLIndicator</code></td><td align="left" valign="center"><p> +Name of the Apache environment variable that contains the SSL protocol name. +<br> +The default value is "SSL_PROTOCOL". +<br> +This directive has been added in version 1.2.41 of mod_jk. </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> @@ -294,16 +319,34 @@ The default value is "SSL_CIPHER_USEKEYS 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). +<a href="../../common_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>JkIgnoreCLIndicator</code></td><td align="left" valign="center"><p> +Name of the Apache environment variable which forces to +ignore an existing Content-Length request header. This can be +used to make mod_jk conpatible with mod_deflate request body +inflation (see <a href="#Advanced Environment Variables">below</a>). +<br> +The default value is "JK_IGNORE_CL". +<br> +This directive has been added in version 1.2.41 of mod_jk. +</p></td></tr><tr><td align="left" valign="center"><code>JkLocalAddrIndicator</code></td><td align="left" valign="center"><p> +Name of the Apache environment variable which can be used to overwrite +the forwarded local IP address. +Use this only if you need to adjust the data (see the +<a href="../../common_howto/proxy.html">proxy</a> documentation). +<br> +The default value is "JK_LOCAL_ADDR". +<br> +This directive has been added in version 1.2.41 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). +<a href="../../common_howto/proxy.html">proxy</a> documentation). <br> The default value is "JK_LOCAL_PORT". <br> @@ -312,7 +355,7 @@ This directive has been added in version 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). +<a href="../../common_howto/proxy.html">proxy</a> documentation). <br> The default value is "JK_REMOTE_HOST". <br> @@ -321,7 +364,7 @@ This directive has been added in version 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). +<a href="../../common_howto/proxy.html">proxy</a> documentation). <br> The default value is "JK_REMOTE_ADDR". <br> @@ -330,7 +373,7 @@ This directive has been added in version 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). +<a href="../../common_howto/proxy.html">proxy</a> documentation). <br> The default value is "JK_REMOTE_PORT". <br> @@ -339,7 +382,7 @@ This directive has been added in version 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). +<a href="../../common_howto/proxy.html">proxy</a> documentation). <br> The default value is "JK_REMOTE_USER". <br> @@ -348,7 +391,7 @@ This directive has been added in version 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). +<a href="../../common_howto/proxy.html">proxy</a> documentation). <br> The default value is "JK_AUTH_TYPE". <br> @@ -384,7 +427,8 @@ 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. +removed for URLs which are not forwarded but instead are +handled by the local server. <br> This directive is only allowed inside VirtualHost. <br> @@ -469,12 +513,11 @@ set the log level between : <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> +See above for details. </p> <div class="example"><pre> - JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " + JkLogStampFormat "[%Y-%m-%d %H:%M:%S.%Q] " </pre></div> <p> @@ -483,18 +526,20 @@ default to <b>"[%a %b %d %H:%M:%S %Y]"</ </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: +You can 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">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> +<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" va lign="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><t r><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: Error count for the last wo rker 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> - JkRequestLogFormat "%w %V %T" + LogFormat "%h %l %u %t \"%r\" %>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> @@ -502,20 +547,20 @@ here is a list of the available request </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. +You can also log a request protocol in the mod_jk log file instead of +the access log. This is not recommended and mostly a backward compatibility +feature. The directive <b>JkRequestLogFormat</b> will configure the format +of this protocol. It gets 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">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" va lign="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><t r><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: Error count for the last wo rker 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> +<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> <div class="example"><pre> - LogFormat "%h %l %u %t \"%r\" %>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 + JkRequestLogFormat "%w %V %T" </pre></div> <br> @@ -641,6 +686,40 @@ but also slightly more complicated. </p> <p> +JkOptions <b>CollapseSlashesAll</b> will collapse multiple +adjacent slashes in request URLs before looking for mount or unmount +matches. +<div class="example"><pre> + JkOptions +CollapseSlashesAll +</pre></div> +<br> +<br> +</p> + +<p> +JkOptions <b>CollapseSlashesUnmount</b> will collapse multiple +adjacent slashes in request URLs only before looking for unmount +matches. This is the default value. +<div class="example"><pre> + JkOptions +CollapseSlashesUnmount +</pre></div> +<br> +<br> +</p> + +<p> +JkOptions <b>CollapseSlashesNone</b> will never collapse multiple +adjacent slashes in request URLs before looking for mount or unmount +matches. Using this value might make you vulnerable for attacks +bypassing your unmount rules. +<div class="example"><pre> + JkOptions +CollapseSlashesNone +</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) @@ -655,14 +734,14 @@ local file that matches (this is done by </p> <p> -If ForwardDirectories is set to false (default) and Apache doesn't find any +If ForwardDirectories is set to <b>false</b> (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 +If ForwardDirectories is set to <b>true</b> 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 @@ -1078,7 +1157,30 @@ then the request will not count as a new come with a session id. This is available since version 1.2.33. </p> +<p> +The environment variable +<b>JK_IGNORE_CL</b> can be set to force ignoring the request +Content-Length header (if it exists). mod_jk will then stream +the request body until the web server indicates that the full body +was read. No Content-Length header will be send to the backend. +This is available since version 1.2.41. +</p> +<p> +This feature can be used to make mod_jk compatible with filters +which change the size of the request body. One such filter is +mod_deflate when used to inflate the body of a request with gzip +encoded body. In this case mod_jk will by default forward a truncated +body, because it gets the wrong body size from the web server. +Telling mod_jk to ignore the Content-Length header will result +in streaming all request body data it can read from the web server +to the backend. +</p> +<p> +You should only set the <b>JK_IGNORE_CL</b> environment variables +for requests that actually need it. Unfortunately there's no way +for mod_jk to detect the need automatically. +</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 © 1999-2014, Apache Software Foundation + Copyright © 1999-2015, Apache Software Foundation </em></font></div></td></tr></table></body></html> \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org