remm 01/11/29 18:52:08 Modified: webapps/tomcat-docs/config project.xml Added: webapps/tomcat-docs/config ajp.xml Log: - Start adding some docs on AJP support. - Add the IIS HOWTO, contributed by Rajan Gupta. Revision Changes Path 1.5 +1 -0 jakarta-tomcat-4.0/webapps/tomcat-docs/config/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/project.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- project.xml 2001/08/25 20:06:30 1.4 +++ project.xml 2001/11/30 02:52:08 1.5 @@ -24,6 +24,7 @@ <menu name="Connectors"> <item name="HTTP/1.1" href="http11.html"/> <item name="Warp" href="warp.html"/> + <item name="AJP" href="ajp.html"/> </menu> <menu name="Containers"> 1.1 jakarta-tomcat-4.0/webapps/tomcat-docs/config/ajp.xml Index: ajp.xml =================================================================== <?xml version="1.0"?> <!DOCTYPE document [ <!ENTITY project SYSTEM "project.xml"> ]> <document> &project; <properties> <author email="[EMAIL PROTECTED]">Remy Maucherat</author> <title>The AJP Connector</title> </properties> <body> <section name="Introduction"> <p>The <strong>AJP Connector</strong> element represents a <strong>Connector</strong> component that communicates with a web connector via the <code>AJP</code> protocol. This is used for cases where you wish to invisibly integrate Tomcat 4 into an existing (or new) Apache installation, and you want Apache to handle the static content contained in the web application, and/or utilize Apache's SSL processing. In many application environments, this will result in better overall performance than running your applications under Tomcat stand-alone using the <a href="http11.html">HTTP/1.1 Connector</a>. However, the only way to know for sure whether it will provide better performance for <strong>your</strong> application is to try it both ways.</p> </section> <section name="Attributes"> <subsection name="Common Attributes"> <p>All implementations of <strong>Connector</strong> support the following attributes:</p> <attributes> <attribute name="className" required="true"> <p>Java class name of the implementation to use. This class must implement the <code>org.apache.catalina.Connector</code> interface. You must specify the standard value defined below.</p> </attribute> <attribute name="enableLookups" required="false"> <p>Set to <code>true</code> if you want calls to <code>request.getRemoteHost()</code> to perform DNS lookups in order to return the actual host name of the remote client. Set to <code>false</code> to skip the DNS lookup and return the IP address in String form instead (thereby improving performance). By default, DNS lookups are enabled.</p> </attribute> <attribute name="redirectPort" required="false"> <p>If this <strong>Connector</strong> is supporting non-SSL requests, and a request is received for which a matching <code><security-constraint></code> requires SSL transport, Catalina will automatically redirect the request to the port number specified here.</p> </attribute> <attribute name="scheme" required="false"> <p>Set this attribute to the name of the protocol you wish to have returned by calls to <code>request.getScheme()</code>. For example, you would set this attribute to "<code>https</code>" for an SSL Connector. The default value is "<code>http</code>". See <a href="#SSL Support">SSL Support</a> for more information.</p> </attribute> <attribute name="secure" required="false"> <p>Set this attribute to <code>true</code> if you wish to have calls to <code>request.isSecure()</code> to return <code>true</code> for requests received by this Connector (you would want this on an SSL Connector). The default value is <code>false</code>.</p> </attribute> </attributes> </subsection> <subsection name="Standard Implementation"> <p>The standard implementation of <strong>AJP Connector</strong> is <strong>org.apache.ajp.tomcat4.Ajp13Connector</strong>.</p> <p><strong>This implementation supports the AJP 1.3 protocol.</strong></p> <p>It supports the following additional attributes (in addition to the common attributes listed above):</p> <attributes> <attribute name="acceptCount" required="false"> <p>The maximum queue length for incoming connection requests when all possible request processing threads are in use. Any requests received when the queue is full will be refused. The default value is 10.</p> </attribute> <attribute name="debug" required="false"> <p>The debugging detail level of log messages generated by this component, with higher numbers creating more detailed output. If not specified, this attribute is set to zero (0).</p> </attribute> <attribute name="maxProcessors" required="false"> <p>The maximum number of request processing threads to be created by this <strong>Connector</strong>, which therefore determines the maximum number of simultaneous requests that can be handled. If not specified, this attribute is set to 20.</p> </attribute> <attribute name="minProcessors" required="false"> <p>The number of request processing threads that will be created when this <strong>Connector</strong> is first started. This attribute should be set to a value smaller than that set for <code>maxProcessors</code>. The default value is 5.</p> </attribute> <attribute name="port" required="true"> <p>The TCP port number on which this <strong>Connector</strong> will create a server socket and await incoming connections. Your operating system will allow only one server application to listen to a particular port number on a particular IP address.</p> </attribute> </attributes> </subsection> </section> <section name="Nested Components"> <p></p> </section> <section name="Configuration HOWTOs"> <subsection name="IIS 4.x and 5.x"> <subsection name="Introduction"> <p>This paragraph explains how to set up IIS 4.0 or newer to cooperate with Tomcat 4.0.1. Normally IIS cannot execute Servlets and Java Server Pages (JSPs), configuring IIS to use Tomcat redirector plugin will allow IIS to redirect Servlet and JSP requests to Tomcat.</p> <p>The Tomcat redirector for IIS is composed of four entities: <ul> <li>isapi_redirect.dll - The IIS server plugin, either obtain a pre-built DLL or build it yourself (see the build section).</li> <li>worker.properties - A file that describes the host(s) and port (s) used by the workers (Tomcat processes).</li> <li>uriworkermap.properties - A file that maps URL-Path patterns to workers.</li> <li>iis_redirect.reg - A file that creates registry entries in the Windows registry.</li> </ul> </p> </subsection> <subsection name="Installation"> <p>Make sure the Tomcat AJP connector is properly declared in the Catalina configuration file.</p> <p>Download isapi_redirect.dll for Tomcat 3.3 release or use the following <a href="http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.3/bin/win32/i386/">link</a>. </p> <p>Note: See below for examples of the configuration files. Those configuration files assume Tomcat is installed in the <code>c:\jakarta-tomcat-4.0.1</code> directory.</p> <p>The next step is to create worker.properties to help isapi_redirect.dll to identify where to find Tomcat and its configuration.</p> <p>Next, the ISAPI filter for Tomcat must be configured to redirect requests for specific webapps to Tomcat.</p> <p>Then the <code>uriworkermap.properties</code> file must be created in <code>%CATALINA_HOME%\conf</code> directory.</p> </subsection> <subsection name="Configuring IIS"> <p> <ul> <li>Launch Internet Service Manager</li> <li>Stop the Web Site if it is running</li> <li>Create a virtual directory, by clicking on the default web site <ul> <li>Type the alias to say jakarta, press Next</li> <li>Set the directory to <code>%CATALINA_HOME%\bin</code> where you installed isapi_redirect.dll, press next</li> <li>Provide only read and execute privileges for security purposes</li> </ul> </li> <li>Add a filter to the default web site, using the IIS Management Console, right click on the properties and go to ISAPI filters tab. Press Add button, add isapi_redirect.dll as a filter the name of the filter should reflect its task (for example, "Jakarta Redirector"). The Executable field should point to the place where we installed isapi_redirect.dll, in our case <code>%CATALINA_HOME%\bin\isapi_redirect.dll</code></li> <li>Copy and paste the registry entries found below into a file iis_redirect.reg. Remember to correct the directories where Tomcat is installed in this file. Run the iis_redirect.reg file found at the end of this document. This will create entries in the registry which the isapi_redirect.dll looks for to determine the configuration and location of Tomcat.</li> <li>Startup IIS.</li> <li>Go to the Properties of the web site and select the ISAPI filters tab to make sure that the ISAPI filter got registered correctly. It should have a Green arrow alongside it. Note: it is recommended to restart computer for the ISAPI filter to load.</li> </ul> </p> </subsection> <subsection name="Sample worker.properties file"> <p> <pre> # ************ Begin worker.properties ************** worker.ajp13.type=ajp13 # # Specifies the load balance factor when used with # a load balancing worker. # Note: # ----> lbfactor must be > 0 # ----> Low lbfactor means less work done by the worker. worker.ajp13.lbfactor=1 # # Specify the size of the open connection cache. #worker.ajp13.cachesize # #------ DEFAULT LOAD BALANCER WORKER DEFINITION ---------------------- #--------------------------------------------------------------------- # # # The loadbalancer (type lb) worker perform weighted round-robin # load balancing with sticky sessions. # Note: # ----> If a worker dies, the load balancer will check its state # once in a while. Until then all work is redirected to peer # worker. worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=ajp13 # # worker.tomcat_home should point to the location where you # installed tomcat. This is where you have your conf, webapps and lib # directories. # worker.tomcat_home=C:\jakarta-tomcat-4.0.1 # # worker.java_home should point to your Java installation. Normally # you should have a bin and lib directories beneath it. # worker.java_home=C:\jdk1.3.1 # # You should configure your environment slash... ps=\ on NT and / on UNIX # and maybe something different elsewhere. # ps=\ # #------ ADVANCED MODE ------------------------------------------------ #--------------------------------------------------------------------- # # #------ DEFAULT worker list ------------------------------------------ #--------------------------------------------------------------------- # # The worker that your plugins should create and work with worker.list=ajp13 # #------ DEFAULT ajp13 WORKER DEFINITION ------------------------------ #--------------------------------------------------------------------- # # # Defining a worker named ajp13 and of type ajp13 # Note that the name and the type do not have to match. # worker.ajp13.port=8009 worker.ajp13.host=localhost # ************ End worker.properties ************** </pre> </p> </subsection> <subsection name="Sample uriworkermap.properties"> <p> <pre> # *********** Begin uriworkermap.properties *** # # Simple worker configuration file # # Mount the Servlet context to the ajp13 worker /servlet/*=ajp13 # Mount the examples context to the ajp13 worker /examples/*=ajp13 # Advanced mount of the examples context # /examples/servlet/*=ajp13 # ************* End uriworkermap.properties **** </pre> </p> </subsection> <subsection name="iis_redirect.reg"> <p> <pre> REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0] "extension_uri"="/jakarta/isapi_redirect.dll" "log_file"="C:\\jakarta-tomcat-4.0.1\\logs\\iis_redirect.log" "log_level"="emerg" "worker_file"="C:\\jakarta-tomcat-4.0.1\\conf\\worker.properties" "worker_mount_file"="C:\\jakarta-tomcat-4.0.1\\conf\\uriworkermap.properties" </pre> </p> </subsection> </subsection> </section> </body> </document>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>