source: nutchez-0.1/tomcat/webapps/docs/config/ajp.html @ 256

Last change on this file since 256 was 66, checked in by waue, 15 years ago

NutchEz - an easy way to nutch

File size: 18.4 KB
Line 
1<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Apache Tomcat Configuration Reference - The AJP Connector</title><meta value="Remy Maucherat" name="author"><meta value="remm@apache.org" name="email"><meta value="Yoav Shapira" name="author"><meta value="yoavs@apache.org" name="email"><meta value="Andrew R. Jaquith" name="author"><meta value="arjaquith@mindspring.com" name="email"></head><body vlink="#525D76" alink="#525D76" link="#525D76" text="#000000" bgcolor="#ffffff"><table cellspacing="0" width="100%" border="0"><!--PAGE HEADER--><tr><td><!--PROJECT LOGO--><a href="http://tomcat.apache.org/"><img border="0" alt="
2    The Apache Tomcat Servlet/JSP Container
3  " align="right" src="../images/tomcat.gif"></a></td><td><font face="arial,helvetica,sanserif"><h1>Apache Tomcat 6.0</h1></font></td><td><!--APACHE LOGO--><a href="http://www.apache.org/"><img border="0" alt="Apache Logo" align="right" src="../images/asf-logo.gif"></a></td></tr></table><table cellspacing="4" width="100%" border="0"><!--HEADER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade></td></tr><tr><!--LEFT SIDE NAVIGATION--><td nowrap="true" valign="top" width="20%"><p><strong>Links</strong></p><ul><li><a href="../index.html">Docs Home</a></li><li><a href="index.html">Config Ref. Home</a></li></ul><p><strong>Top Level Elements</strong></p><ul><li><a href="server.html">Server</a></li><li><a href="service.html">Service</a></li></ul><p><strong>Executors</strong></p><ul><li><a href="executor.html">Executor</a></li></ul><p><strong>Connectors</strong></p><ul><li><a href="http.html">HTTP</a></li><li><a href="ajp.html">AJP</a></li></ul><p><strong>Containers</strong></p><ul><li><a href="context.html">Context</a></li><li><a href="engine.html">Engine</a></li><li><a href="host.html">Host</a></li><li><a href="cluster.html">Cluster</a></li></ul><p><strong>Nested Components</strong></p><ul><li><a href="globalresources.html">Global Resources</a></li><li><a href="loader.html">Loader</a></li><li><a href="manager.html">Manager</a></li><li><a href="realm.html">Realm</a></li><li><a href="resources.html">Resources</a></li><li><a href="valve.html">Valve</a></li></ul><p><strong>Cluster Elements</strong></p><ul><li><a href="cluster.html">Cluster</a></li><li><a href="cluster-manager.html">Manager</a></li><li><a href="cluster-channel.html">Channel</a></li><li><a href="cluster-membership.html">Channel/Membership</a></li><li><a href="cluster-sender.html">Channel/Sender</a></li><li><a href="cluster-receiver.html">Channel/Receiver</a></li><li><a href="cluster-interceptor.html">Channel/Interceptor</a></li><li><a href="cluster-valve.html">Valve</a></li><li><a href="cluster-deployer.html">Deployer</a></li><li><a href="cluster-listener.html">ClusterListener</a></li></ul><p><strong>Global Settings</strong></p><ul><li><a href="systemprops.html">System properties</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td align="left" valign="top" width="80%"><table cellspacing="4" width="100%" border="0"><tr><td valign="top" align="left"><h1>Apache Tomcat Configuration Reference</h1><h2>The AJP Connector</h2></td><td nowrap="true" valign="top" align="right"><small><a href="printer/ajp.html"><img alt="Printer Friendly Version" border="0" src="../images/printer.gif"><br>print-friendly<br>version
4                    </a></small></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Introduction"><strong>Introduction</strong></a></font></td></tr><tr><td><blockquote>
5
6  <p>The <strong>AJP Connector</strong> element represents a
7  <strong>Connector</strong> component that communicates with a web
8  connector via the <code>AJP</code> protocol.  This is used for cases
9  where you wish to invisibly integrate Tomcat 6 into an existing (or new)
10  Apache installation, and you want Apache to handle the static content
11  contained in the web application, and/or utilize Apache's SSL
12  processing.</p>
13
14  <p>This connector supports load balancing when used in conjunction with
15  the <code>jvmRoute</code> attribute of the
16  <a href="engine.html">Engine</a>.</p>
17
18<p>The native connectors supported with this Tomcat release are:
19<ul>
20  <li>JK 1.2.x with any of the supported servers</li>
21  <li>mod_proxy on Apache httpd 2.x (included by default in Apache HTTP Server 2.2),
22      with AJP enabled: see
23      <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html">the httpd docs</a>
24      for details.</li>
25</ul>
26</p>
27
28<p><b>Other native connectors supporting AJP may work, but are no longer supported.</b></p>
29
30</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Attributes"><strong>Attributes</strong></a></font></td></tr><tr><td><blockquote>
31
32  <table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Common Attributes"><strong>Common Attributes</strong></a></font></td></tr><tr><td><blockquote>
33
34  <p>All implementations of <strong>Connector</strong>
35  support the following attributes:</p>
36
37  <table cellpadding="5" border="1"><tr><th bgcolor="#023264" width="15%"><font color="#ffffff">Attribute</font></th><th bgcolor="#023264" width="85%"><font color="#ffffff">Description</font></th></tr><tr><td valign="center" align="left"><code>allowTrace</code></td><td valign="center" align="left">
38      <p>A boolean value which can be used to enable or disable the TRACE
39      HTTP method. If not specified, this attribute is set to false.</p>
40    </td></tr><tr><td valign="center" align="left"><code>emptySessionPath</code></td><td valign="center" align="left">
41      <p>If set to <code>true</code>, all paths for session cookies will be set
42      to <code>/</code>. This can be useful for portlet specification implementations.
43      If not specified, this attribute is set to <code>false</code>.</p>
44    </td></tr><tr><td valign="center" align="left"><code>enableLookups</code></td><td valign="center" align="left">
45      <p>Set to <code>true</code> if you want calls to
46      <code>request.getRemoteHost()</code> to perform DNS lookups in
47      order to return the actual host name of the remote client.  Set
48      to <code>false</code> to skip the DNS lookup and return the IP
49      address in String form instead (thereby improving performance).
50      By default, DNS lookups are enabled.</p>
51    </td></tr><tr><td valign="center" align="left"><code>maxPostSize</code></td><td valign="center" align="left">
52      <p>The maximum size in bytes of the POST which will be handled by
53      the container FORM URL parameter parsing. The feature can be disabled by
54      setting this attribute to a value less than or equal to 0.
55      If not specified, this attribute is set to 2097152 (2 megabytes).</p>
56    </td></tr><tr><td valign="center" align="left"><code>maxSavePostSize</code></td><td valign="center" align="left">
57      <p>The maximum size in bytes of the POST which will be saved/buffered by
58      the container during FORM or CLIENT-CERT authentication. For both types
59      of authentication, the POST will be saved/buffered before the user is
60      authenticated. For CLIENT-CERT authentication, the POST is buffered for
61      the duration of the SSL handshake and the buffer emptied when the request
62      is processed. For FORM authentication the POST is saved whilst the user
63      is re-directed to the login form and is retained until the user
64      successfully authenticates or the session associated with the
65      authentication request expires. The limit can be disabled by setting this
66      attribute to -1. Setting the attribute to zero will disable the saving of
67      POST data during authentication. If not specified, this attribute is set
68      to 4096 (4 kilobytes).</p>
69    </td></tr><tr><td valign="center" align="left"><code>protocol</code></td><td valign="center" align="left">
70      <p>This attribute value must be <code>AJP/1.3</code> to use the AJP
71      handler.</p>
72    </td></tr><tr><td valign="center" align="left"><code>proxyName</code></td><td valign="center" align="left">
73      <p>If this <strong>Connector</strong> is being used in a proxy
74      configuration, configure this attribute to specify the server name
75      to be returned for calls to <code>request.getServerName()</code>.
76      See <a href="#Proxy Support">Proxy Support</a> for more
77      information.</p>
78    </td></tr><tr><td valign="center" align="left"><code>proxyPort</code></td><td valign="center" align="left">
79      <p>If this <strong>Connector</strong> is being used in a proxy
80      configuration, configure this attribute to specify the server port
81      to be returned for calls to <code>request.getServerPort()</code>.
82      See <a href="#Proxy Support">Proxy Support</a> for more
83      information.</p>
84    </td></tr><tr><td valign="center" align="left"><code>redirectPort</code></td><td valign="center" align="left">
85      <p>If this <strong>Connector</strong> is supporting non-SSL
86      requests, and a request is received for which a matching
87      <code>&lt;security-constraint&gt;</code> requires SSL transport,
88      Catalina will automatically redirect the request to the port
89      number specified here.</p>
90    </td></tr><tr><td valign="center" align="left"><code>request.registerRequests</code></td><td valign="center" align="left">
91      <p>This attribute controls request registration for JMX monitoring
92      of the Connector.  It is enabled by default, but may be turned
93      it off to save a bit of memory.</p>
94    </td></tr><tr><td valign="center" align="left"><code>scheme</code></td><td valign="center" align="left">
95      <p>Set this attribute to the name of the protocol you wish to have
96      returned by calls to <code>request.getScheme()</code>.  For
97      example, you would set this attribute to "<code>https</code>"
98      for an SSL Connector.  The default value is "<code>http</code>".
99      See <a href="#SSL Support">SSL Support</a> for more information.</p>
100    </td></tr><tr><td valign="center" align="left"><code>secure</code></td><td valign="center" align="left">
101      <p>Set this attribute to <code>true</code> if you wish to have
102      calls to <code>request.isSecure()</code> to return <code>true</code>
103      for requests received by this Connector (you would want this on an
104      SSL Connector).  The default value is <code>false</code>.</p>
105    </td></tr><tr><td valign="center" align="left"><code>URIEncoding</code></td><td valign="center" align="left">
106      <p>This specifies the character encoding used to decode the URI bytes,
107      after %xx decoding the URL. If not specified, ISO-8859-1 will be used.
108      </p>
109    </td></tr><tr><td valign="center" align="left"><code>useBodyEncodingForURI</code></td><td valign="center" align="left">
110      <p>This specifies if the encoding specified in contentType should be used
111      for URI query parameters, instead of using the URIEncoding. This
112      setting is present for compatibility with Tomcat 4.1.x, where the
113      encoding specified in the contentType, or explicitely set using
114      Request.setCharacterEncoding method was also used for the parameters from
115      the URL. The default value is <code>false</code>.
116      </p>
117    </td></tr><tr><td valign="center" align="left"><code>useIPVHosts</code></td><td valign="center" align="left">
118      <p>Set this attribute to <code>true</code> to cause Tomcat to use
119      the ServerName passed by the native web server to determine the Host
120      to send the request to.  The default value is <code>false</code>.</p>
121    </td></tr><tr><td valign="center" align="left"><code>xpoweredBy</code></td><td valign="center" align="left">
122      <p>Set this attribute to <code>true</code> to cause Tomcat to advertise
123      support for the Srevlet specification using the header recommended in the
124      specification.  The default value is <code>false</code>.</p>
125    </td></tr></table>
126
127  </blockquote></td></tr></table>
128
129  <table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Standard Implementation"><strong>Standard Implementation</strong></a></font></td></tr><tr><td><blockquote>
130
131  <p>To use AJP, you
132  must specify the protocol attribute (see above).</p>
133
134  <p><strong>This implementation supports the AJP 1.3 protocol.</strong></p>
135
136  <p>It supports the following additional attributes (in addition to the
137  common attributes listed above):</p>
138
139  <table cellpadding="5" border="1"><tr><th bgcolor="#023264" width="15%"><font color="#ffffff">Attribute</font></th><th bgcolor="#023264" width="85%"><font color="#ffffff">Description</font></th></tr><tr><td valign="center" align="left"><code>address</code></td><td valign="center" align="left">
140      <p>For servers with more than one IP address, this attribute
141      specifies which address will be used for listening on the specified
142      port.  By default, this port will be used on all IP addresses
143      associated with the server. A value of <code>127.0.0.1</code>
144      indicates that the Connector will only listen on the loopback
145      interface.</p>
146    </td></tr><tr><td valign="center" align="left"><code>backlog</code></td><td valign="center" align="left">
147      <p>The maximum queue length for incoming connection requests when
148      all possible request processing threads are in use.  Any requests
149      received when the queue is full will be refused.  The default
150      value is 10.</p>
151    </td></tr><tr><td valign="center" align="left"><code>bufferSize</code></td><td valign="center" align="left">
152      <p>The size of the output buffer to use.  If less than or equal to zero,
153         then output buffering is disabled.  The default value is -1
154         (i.e. buffering disabled)</p>
155    </td></tr><tr><td valign="center" align="left"><code>connectionTimeout</code></td><td valign="center" align="left">
156      <p>The number of milliseconds this <strong>Connector</strong> will wait,
157      after accepting a connection, for the request URI line to be
158      presented.  The default value is infinite (i.e. no timeout).</p>
159    </td></tr><tr><td valign="center" align="left"><code>executor</code></td><td valign="center" align="left">
160      <p>A reference to the name in an <a href="executor.html">Executor</a> element.
161         If this attribute is enabled, and the named executor exists, the connector will
162         use the executor, and all the other thread attributes will be ignored.</p>
163    </td></tr><tr><td valign="center" align="left"><code>keepAliveTimeout</code></td><td valign="center" align="left">
164      <p>The number of milliseconds this <strong>Connector</strong> will wait for
165       another AJP request before closing the connection.
166       The default value is to use the value that has been set for the
167       connectionTimeout attribute.</p>
168    </td></tr><tr><td valign="center" align="left"><code>maxThreads</code></td><td valign="center" align="left">
169      <p>The maximum number of request processing threads to be created
170      by this <strong>Connector</strong>, which therefore determines the
171      maximum number of simultaneous requests that can be handled.  If
172      not specified, this attribute is set to 200. If an executor is associated
173      with this connector, this attribute is ignored as the connector will
174      execute tasks using the executor rather than an internal thread pool.</p>
175    </td></tr><tr><td valign="center" align="left"><code>packetSize</code></td><td valign="center" align="left">
176      <p>This attribute sets the maximum AJP packet size in Bytes. The maximum
177      value is 65536. It should be the same as the <code>max_packet_size</code>
178      directive configured for mod_jk. Normally it is not necessary to change
179      the maximum packet size. Problems with the default value have been
180      reported when sending certificates or certificate chains. The default
181      value is 8192.</p>
182    </td></tr><tr><td valign="center" align="left"><strong><code>port</code></strong></td><td valign="center" align="left">
183      <p>The TCP port number on which this <strong>Connector</strong>
184      will create a server socket and await incoming connections.  Your
185      operating system will allow only one server application to listen
186      to a particular port number on a particular IP address.</p>
187    </td></tr><tr><td valign="center" align="left"><code>request.secret</code></td><td valign="center" align="left">
188      <p>Only requests from workers with this secret keyword will be accepted.
189      </p>
190    </td></tr><tr><td valign="center" align="left"><code>request.shutdownEnabled</code></td><td valign="center" align="left">
191      <p>If true and a secret has been configured, a correctly fomatted AJP
192      request (that includes the secret) will shutdown the Tomcat instance
193      associated with this connector. This is set to <code>false</code> by
194      default.</p>
195    </td></tr><tr><td valign="center" align="left"><code>request.useSecret</code></td><td valign="center" align="left">
196      <p>If set to <code>true</code>, then a random value for
197      <code>request.secret</code> will be generated. It is for use with
198      <code>request.shutdownEnabled</code>. This is set to <code>false</code>
199      by default.</p>
200    </td></tr><tr><td valign="center" align="left"><code>tcpNoDelay</code></td><td valign="center" align="left">
201      <p>If set to <code>true</code>, the TCP_NO_DELAY option will be
202      set on the server socket, which improves performance under most
203      circumstances.  This is set to <code>true</code> by default.</p>
204    </td></tr><tr><td valign="center" align="left"><code>tomcatAuthentication</code></td><td valign="center" align="left">
205      <p>If set to <code>true</code>, the authetication will be done in Tomcat.
206      Otherwise, the authenticated principal will be propagated from the native
207      webaserver and used for authorization in Tomcat. 
208      The default value is <code>true</code>.</p>
209    </td></tr></table>
210
211  </blockquote></td></tr></table>
212
213</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Nested Components"><strong>Nested Components</strong></a></font></td></tr><tr><td><blockquote>
214
215  <p>None at this time.</p>
216
217</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font size="-1" color="#525D76"><em>
218        Copyright &copy; 1999-2008, Apache Software Foundation
219        </em></font></div></td></tr></table></body></html>
Note: See TracBrowser for help on using the repository browser.