This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat-connectors.git
commit 45e226872c7ab65a994be25ff040232aafb33017 Author: Mark Thomas <ma...@apache.org> AuthorDate: Thu Feb 24 16:55:01 2022 +0000 Remove references to mod_jk2 JK2 has been deprecated since 2004 and retaining the docs and the links hinders more than it helps. --- support/jk_ws.m4 | 2 +- tools/jkrelease.sh | 1 - xdocs/ajp/ajpv13a.xml | 4 - xdocs/ajp/project.xml | 1 - xdocs/common_howto/project.xml | 1 - xdocs/index.xml | 5 - xdocs/jk2/confighowto.xml | 132 ------- xdocs/jk2/configtc.xml | 57 --- xdocs/jk2/configtccom.xml | 314 ---------------- xdocs/jk2/configtcex.xml | 120 ------ xdocs/jk2/configweb.xml | 186 ---------- xdocs/jk2/configwebcom.xml | 764 -------------------------------------- xdocs/jk2/configwebex.xml | 108 ------ xdocs/jk2/davhowto.xml | 83 ----- xdocs/jk2/installhowto.xml | 261 ------------- xdocs/jk2/vhosthowto.xml | 610 ------------------------------ xdocs/miscellaneous/changelog.xml | 5 + xdocs/miscellaneous/faq.xml | 4 +- xdocs/miscellaneous/project.xml | 1 - xdocs/news/project.xml | 1 - xdocs/project.xml | 1 - xdocs/reference/project.xml | 1 - xdocs/webserver_howto/project.xml | 1 - 23 files changed, 8 insertions(+), 2655 deletions(-) diff --git a/support/jk_ws.m4 b/support/jk_ws.m4 index cdb90d3..1178f44 100644 --- a/support/jk_ws.m4 +++ b/support/jk_ws.m4 @@ -77,7 +77,7 @@ AC_DEFUN( if ${TEST} -d ${tempval}/srclib/apr ; then # Apache 2 contains apr. if ${TEST} ! -f ${tempval}/srclib/apr/config.status ; then - AC_MSG_ERROR(configure Apache2 before mod_jk2) + AC_MSG_ERROR(configure Apache2 before mod_jk) fi osdir=`${GREP} @OSDIR@ ${tempval}/srclib/apr/config.status | sed 's:s,@OSDIR@,::' | sed 's:,;t t::'` $2_INCL="-I${tempval}/include -I${withval}/os/${osdir}" diff --git a/tools/jkrelease.sh b/tools/jkrelease.sh index 6042a9f..d42ae85 100755 --- a/tools/jkrelease.sh +++ b/tools/jkrelease.sh @@ -362,7 +362,6 @@ copy_files ${JK_DIST}.tmp/jk/conf $JK_DIST/conf "$COPY_CONF" # Remove extra directories and files targetdir=${JK_DIST} -rm -rf ${targetdir}/xdocs/jk2 rm -f ${targetdir}/native/build.xml rm -f ${targetdir}/native/NOTICE rm -f ${targetdir}/native/LICENSE diff --git a/xdocs/ajp/ajpv13a.xml b/xdocs/ajp/ajpv13a.xml index 65d0b68..714f638 100644 --- a/xdocs/ajp/ajpv13a.xml +++ b/xdocs/ajp/ajpv13a.xml @@ -432,10 +432,6 @@ The HTTP method, encoded as a single byte: </table> </p> -<p>Later version of ajp13, when used with mod_jk2, will transport -additional methods, even if they are not in this list. -</p> - </subsection> <subsection name="protocol, req_uri, remote_addr, remote_host, server_name, server_port, is_ssl"> diff --git a/xdocs/ajp/project.xml b/xdocs/ajp/project.xml index 3c10ac5..d3851c4 100644 --- a/xdocs/ajp/project.xml +++ b/xdocs/ajp/project.xml @@ -62,7 +62,6 @@ <item name="Contribute documentation" href="../miscellaneous/doccontrib.html"/> <item name="JK Status Ant Tasks" href="../miscellaneous/jkstatustasks.html"/> <item name="Reporting Tools" href="../miscellaneous/reporttools.html"/> - <item name="Old JK/JK2 documentation" href="http://tomcat.apache.org/connectors-doc-archive/jk2/index.html"/> </menu> <menu name="News"> diff --git a/xdocs/common_howto/project.xml b/xdocs/common_howto/project.xml index 73f9b3b..141559a 100644 --- a/xdocs/common_howto/project.xml +++ b/xdocs/common_howto/project.xml @@ -62,7 +62,6 @@ <item name="Contribute documentation" href="../miscellaneous/doccontrib.html"/> <item name="JK Status Ant Tasks" href="../miscellaneous/jkstatustasks.html"/> <item name="Reporting Tools" href="../miscellaneous/reporttools.html"/> - <item name="Old JK/JK2 documentation" href="http://tomcat.apache.org/connectors-doc-archive/jk2/index.html"/> </menu> <menu name="News"> diff --git a/xdocs/index.xml b/xdocs/index.xml index d38f0cf..a1f40cf 100644 --- a/xdocs/index.xml +++ b/xdocs/index.xml @@ -208,11 +208,6 @@ This page describes ant tasks to automate JK management via the status worker. This page contains information, on some report analysis scripts contained in the JK distribution. </p> </li> -<li><a href="http://tomcat.apache.org/connectors-doc-archive/jk2/index.html"> -<b>Old JK/JK2 documentation archive.</b></a> -<p>Here you can find old JK and JK2 documentation. -</p> -</li> </ul> </section> diff --git a/xdocs/jk2/confighowto.xml b/xdocs/jk2/confighowto.xml deleted file mode 100644 index 4151b30..0000000 --- a/xdocs/jk2/confighowto.xml +++ /dev/null @@ -1,132 +0,0 @@ -<?xml version="1.0"?> -<document> -<copyright> - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -</copyright> -<properties> -<title>Quick Start JK2 Configuration Guide</title> -<author email="mt...@mappingsoft.com">Mladen Turk</author> -</properties> -<section name="Introduction"> -<p> - This document describes the configuration files used by JK2 on the - Tomcat and Web Server side: - <ul> - <li> - <b>jk2.properties</b> is used on the Tomcat side. It's installation path in - the $TOMCAT_HOME/conf directory. - </li> - <li> - <b>workers2.properties</b> is used on the webserver side. For the Apache - servers the default path is in the ServerRoot/conf directory. - </li> - </ul> - Although JK2 has many things in common with mod_jk, the configuration is quite - different, and all the directives should be inside the workers2.properties. - This enables JK2 to have the same configuration file no mater what the web server - it's connected to. -</p> -</section> - -<section name="Minimum Configuration"> -<p> - Minimum configuration is the simplest one to make the JK2 working. The used - channel will be socket, and lot of options are used by default. Both the - Tomcat and web server are on the same computer. -</p> -<p> -jk2.properties: -<source> -# The default port is 8009 but you can use another one -# channelSocket.port=8019 -</source> -That is all needed on the Tomcat side to configure the JK2. -</p> -<p> -workers2.properties: -<source> -# Define the communication channel -[channel.socket:localhost:8009] -info=Ajp13 forwarding over socket -tomcatId=localhost:8009 - -# Map the Tomcat examples webapp to the Web server uri space -[uri:/examples/*] -info=Map the whole webapp -</source> -</p> -<p> -Start the Tomcat and Web server and browse to the <a>http://localhost/examples/</a> -</p> -</section> - -<section name="Minimum JNI Configuration"> -<p> - Minimum JNI configuration is the simplest one to make the Tomcat working - from inside the web server as inprocess. The only comunication channel used - is JNI. The JK2 will register all the native calls by itself, so there is - no need to specify the native library on Java side. -</p> -<p> -jk2.properties: -<source> -# Add the apr and channelJni to the list of handlers -handler.list=apr,request,container,channelJni -# The native libraries will be registered by JK2 -apr.jniModeSo=inprocess -</source> -</p> -<p> -workers2.properties: -<source> -# Define the comunication channel -[channel.jni:jni] -info=The jni channel, used if tomcat is started inprocess - -# Define the parameters for the Java Virtual Machine -[vm:] -info=Parameters used to load a JVM in the server process -OPT=-Djava.class.path=${TOMCAT_HOME}/lib/tomcat-jni.jar;${TOMCAT_HOME}/lib/tomcat.jar -OPT=-Dtomcat.home=${TOMCAT_HOME} -OPT=-Dcatalina.home=${TOMCAT_HOME} -OPT=-Xmx128M - -# JNI worker startup handler -[worker.jni:onStartup] -info=Command to be executed by the VM on startup. This one will start tomcat. -class=org/apache/jk/apr/TomcatStarter -ARG=start -stdout=${serverRoot}/logs/stdout.log -stderr=${serverRoot}/logs/stderr.log - -# JNI worker shutdown handler -[worker.jni:onShutdown] -info=Command to be executed by the VM on shutdown. This one will stop tomcat. -class=org/apache/jk/apr/TomcatStarter -ARG=stop - -# Map the Tomcat examples webapp to the Web server uri space -[uri:/examples/*] -info=Map the whole webapp -</source> -</p> -<p> -Start the Web server and browse to the <a>http://localhost/examples/</a> -</p> - -</section> - -</document> \ No newline at end of file diff --git a/xdocs/jk2/configtc.xml b/xdocs/jk2/configtc.xml deleted file mode 100644 index 07dde0d..0000000 --- a/xdocs/jk2/configtc.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0"?> -<document> -<copyright> - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -</copyright> - <properties> - <title>Configuration options</title> - <author email="jfrederic.cl...@fujitsu-siemens.com">Jean-Frederic Clere</author> - </properties> - <section name="Intro"> - <p> - This document describes the configuration file used by mod_jk2 on the - Tomcat site. Its default name is ${jkHome}/conf/jk2.properties, - where ${jkHome} is the well known ${catalina.base} property. -</p> - </section> - <section name="Config File Format"> - <p> settings are specified in the following format: - <source> - handler.propertie=value - </source> - </p></section> - <section name="Generic properties"> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>handler.list</td> - <td>request,container,channelSocket</td> - <td>Handlers to load.</td> - </tr> - <tr> - <td>class.myhandler</td> - <td>No default value</td> - <td>Define the class of the handler myhandler.</td> - </tr> - </table> - </p> - </section> -</document> diff --git a/xdocs/jk2/configtccom.xml b/xdocs/jk2/configtccom.xml deleted file mode 100644 index 3be6b14..0000000 --- a/xdocs/jk2/configtccom.xml +++ /dev/null @@ -1,314 +0,0 @@ -<?xml version="1.0"?> -<document> -<copyright> - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -</copyright> - <properties> - <title>Coyote/JK2 Handlers</title> - <author email="jfrederic.cl...@fujitsu-siemens.com">Jean-Frederic Clere</author> - </properties> - <section name="apr"> - <p> -APR descriptor -</p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>NativeSo</td> - <td>jkjni</td> - <td> - Location of the jkjni dynamic library. - It is searched in java.library.path but a absolute path can be specified. - </td> - </tr> - <tr> - <td>jniModeSo</td> - <td>inprocess</td> - <td> - If set to "inprocess" the jk2 will regiter native library functions by itself. - If not then it has to be the absolute path of the jkjni dynamic library. - </td> - </tr> - <tr> - <td>baseDir</td> - <td></td> - <td></td> - </tr> - <tr> - <td>aprHome</td> - <td></td> - <td></td> - </tr> - <tr> - <td>soExt</td> - <td></td> - <td></td> - </tr> - </table> - </p> - </section> - <section name="channelSocket"> - <p> - A communication transport from a remote Web Server. -</p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>port</td> - <td>8009</td> - <td>First port where Tomcat is listening</td> - </tr> - <tr> - <td>address</td> - <td>127.0.0.1</td> - <td>Local address where Tomcat is listening.</td> - </tr> - <tr> - <td>maxPort</td> - <td>port+10</td> - <td>Max port used to listen.</td> - </tr> - <tr> - <td>maxThreads</td> - <td></td> - <td></td> - </tr> - <tr> - <td>backLog</td> - <td></td> - <td></td> - </tr> - <tr> - <td>tcpNoDelay</td> - <td></td> - <td></td> - </tr> - <tr> - <td>soTimeout</td> - <td></td> - <td></td> - </tr> - <tr> - <td>soLinger</td> - <td></td> - <td></td> - </tr> - <tr> - <td>serverTimeout</td> - <td></td> - <td></td> - </tr> - </table> - </p> - </section> - <section name="channelUnix"> - <p> A AF_UNIX socket communication transport from a local Web Server.</p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>file</td> - <td>No default value</td> - <td> - Name of the "file" associate with the socket. - That must be absolut path name. - </td> - </tr> - </table> - </p> - </section> - <section name="channelJni"> - <p>A in Web Server process communication.</p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - </table> - </p> - </section> - <section name="mx"> - <p>mx4j adapter.</p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>port</td> - <td>-1 (Disabled)</td> - <td>Port Number.</td> - </tr> - </table> - </p> - </section> - <section name="shm"> - <p> shared memory objects handler.</p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>file</td> - <td>/tmp/shm.file</td> - <td>Shared memory file.</td> - </tr> - <tr> - <td>host</td> - <td>localhost</td> - <td>Host name.</td> - </tr> - <tr> - <td>port</td> - <td>8009</td> - <td>Port number.</td> - </tr> - <tr> - <td>unixSocket</td> - <td>No default value</td> - <td>Unix socket where tomcat is listening.</td> - </tr> - </table> - </p> - </section> - <section name="request"> - <p>Request handler</p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>tomcatAuthentication</td> - <td>true</td> - <td>the request handler will get the authenticated user from the HTTP server, honoring any auth done there.</td> - </tr> - <tr> - <td>ajpidDir</td> - <td></td> - <td></td> - </tr> - <tr> - <td>decodedUri</td> - <td></td> - <td></td> - </tr> - <tr> - <td>secret</td> - <td></td> - <td></td> - </tr> - <tr> - <td>useSecret</td> - <td></td> - <td></td> - </tr> - </table> - </p> - </section> - <section name="modeler"> - <p>????</p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr/> - </table> - </p> - </section> - <section name="container"> - <p>????</p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr/> - </table> - </p> - </section> - <section name="modjk"> - <p>????</p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>pass</td> - <td></td> - <td></td> - </tr> - <tr> - <td>statusPath</td> - <td></td> - <td></td> - </tr> - <tr> - <td>updateInterval</td> - <td></td> - <td></td> - </tr> - <tr> - <td>user</td> - <td></td> - <td></td> - </tr> - <tr> - <td>webServerHost</td> - <td></td> - <td></td> - </tr> - <tr> - <td>webServerPort</td> - <td></td> - <td></td> - </tr> - </table> - </p> - </section> -</document> - diff --git a/xdocs/jk2/configtcex.xml b/xdocs/jk2/configtcex.xml deleted file mode 100644 index 007b2c1..0000000 --- a/xdocs/jk2/configtcex.xml +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0"?> -<document> -<copyright> - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -</copyright> -<properties> -<title>Examples</title> -<author email="jfrederic.cl...@fujitsu-siemens.com">Jean-Frederic Clere</author> -</properties> - -<section name="jk2.properties"> -<p> -The examples below are working when the Web Server is configured according the -examples described in the configweb file. -</p> -<subsection name="using normal socket"> -<p> -There is no need to use the jkjni logic to use normal socket, so that just for -Fun. -</p> - -<p> -<source> -# list of needed handlers. -handler.list=apr,channelSocket,request - -# Override the default port for the channelSocket -channelSocket.port=8019 - -# Dynamic library -apr.NativeSo=/home1/jakarta/jakarta-tomcat-connectors/jk/build/jk2/apache2/jkjni.so -</source> -</p> -</subsection> - -<subsection name="using AF_UNIX socket"> -<p> -Create and listen on a AF_UNIX socket. The location of the socket must be the -same in the Web Server configuration file. -</p> - -<p> -<source> -# list of needed handlers. -handler.list=apr,channelUnix,request - -# Location of the socket. -channelUnix.file=${jkHome}/work/jk2.socket - -# Dynamic library -jtc=/home1/jakarta/jakarta-tomcat-connectors -apr.NativeSo=${jtc}/jk/build/jk2/apache2/jkjni.so -</source> -</p> -</subsection> - -<subsection name="using user defined class for communication"> -<p> -It is possible to have a user defined class for the communication. -Here we have used the ChannelUn as example. -</p> - -<p> -<source> -# Define our own handler. -class.mychannel=org.apache.jk.common.ChannelUn -# list of needed handlers. -handler.list=apr,mychannel,request - -# Location of the socket. -channelUnix.file=${jkHome}/work/jk2.socket - -# Dynamic library -jtc=/home1/jakarta/jakarta-tomcat-connectors -apr.NativeSo=${jtc}/jk/build/jk2/apache2/jkjni.so -</source> -</p> -</subsection> - -<subsection name="using jni channel class for communication"> -<p> -Here we have the minimum configuration needed for the jni communication. -</p> - -<p> -<source> -# list of needed handlers. -handler.list=apr,request,channelJni - -# Dynamic library needs to be defined only if Tomcat is used -# out of process -jtc=/home1/jakarta/jakarta-tomcat-connectors -apr.NativeSo=${jtc}/jk/build/jk2/apache2/jkjni.so -# Or you can use the mod_jk2 directly -apr.jniModeSo=/opt/apache2/modules/mod_jk2.so - -# If you wish to start the Tomcat from inside web server then -# you don't need any above directive. Here is shown the default -# value for the apr that you can ommit -apr.jniModeSo=inprocess - -</source> -</p> -</subsection> - -</section> -</document> diff --git a/xdocs/jk2/configweb.xml b/xdocs/jk2/configweb.xml deleted file mode 100644 index 4c98778..0000000 --- a/xdocs/jk2/configweb.xml +++ /dev/null @@ -1,186 +0,0 @@ -<?xml version="1.0"?> -<document> -<copyright> - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -</copyright> -<properties> -<title>Configuration file</title> -<author email="cmanola...@yahoo.com">Costin Manolache</author> -<author email="jfrederic.cl...@fujitsu-siemens.com">Jean-Frederic Clere</author> -</properties> - <section name="Intro"> - - <p>Jk2 uses an architecture and configuration mechanism modeled after JMX. It consist of -"jk_bean" components, with a registry and API that attempts to mirror JMX.</p> - - <p>As in JMX, multiple config formats and stores are possible. The default is a neutral .INI-style -file, and Apache2 also supports configuration in httpd.conf. Other formats and repositories can be -easily implemented, but the general concept is the same.</p> - - <p>Each component has a name, a type and a set of attributes. Reasonable defaults are provided, and -some components are created automatically using the defaults if not explicitely configured. -You need to specify the config only where you want to override the defaults.</p> - - </section> - - <section name="Config file format"> - - <p>The config file is named "workers2.properties", located by default in ${serverRoot}/conf, -where ${serverRoot} is the web server dir, like /usr/local/apache. It is possible to modify the location -of the file using server-specific directives.</p> - - <p>Settings are grouped in sections - one section for each object. The section head is the component -name, and must include the type and local name of the component, separated by ":". Inside each section -you must define the attributes of the component. The attribute name is a simple string, with no '.' or -special characters. The value is a string - no quoting is currently supported. It should be noted that -the component name is processed to compute default for the component attributes - for example -[channel.socket:localhost:8009] name will create a socket channel object with host=locahost and -port=8009. You don't need to provide this information twice. It is highly recommended to use -this naming scheme for consistency, even if you could use any name and then specify the properties -explicitely.</p> - - <p>The general syntax is: - <source> - [TYPE:NAME] - PROPERTY=VALUE - </source> - </p> - - <p>It is also possible to use an alternate format, mostly for backward compatibility: - <source> - TYPE:NAME.PROPERTY=VALUE - </source> - </p> - </section> - - <section name="Runtime reconfiguration"> - - <p>The main purpose of this reconfiguration is to implement "graceful" shutdown and -to allow adding or disabling of more tomcat instances in the load balancing mode</p> - - <p>Each component has a "ver" attribute - it is initially set to the value in the -config file or 0 if this is not specified. Every time the config file is read, jk will -check the version number in the component, and reconfigure if it is different.</p> - - <p>If Jk2 reloads the config file, it detect modified components using "ver" and reconfigures them. -To avoid performance hits, the check is done only when the /jkstatus page is accessed - or -if the scoreboard signature changes. An access to /jkstatus will check the timestamp of the -config file and if a change is detected it'll reload the config file. In apache and multiprocess -servers - this can only affect the current process, so /jkstatus will increment the scoreboard mark. -All other processes in a multiprocess server will see the modified byte and reload before serving the next request.</p> - -<p>Changing the file and forcing a reload is currently the easiest way to reconfigure. A JMX proxy -is in experimental stage and will allow the user to perform all configuration in JMX - using same -tools that he uses for tomcat, and completely transparent. The internal implementation will also -save the file - it is the cleanest way to sync multi-process web servers. -</p> - - - </section> - - <section name="Changing 'graceful' stop state"> - - <p>Each tomcat instance corresponds to a "channel" jk component that defines the host and port. The -channel can be set in a special "graceful" mode or back to active by setting the corresponding attribute. -This mode disables sending any new requests to that tomcat instance - only requests for -an existing session are permitted.</p> - - <p>When you want to disable a tomcat instance, you should first set the channel in -"graceful" mode, then wait until all existing sessions expire or are completed. If the sessions -are serializable and tomcat is configured in clustering mode - you can also migrate the -sessions to a different instance.</p> - - <p>1. Edit workers2.properties. Find the channel. Change "graceful" to "1" to disable or "0" - to reactivate". Increment "ver".<br></br> - 2. Access /jkstatus page. You should see the value changed in the channel and worker info.</p> - - <p>When a worker is in this state, no new requests will be sent to that worker - only requests that have an -explicit session ID for that particular worker. It is recommended you wait for all sessions to expire -before stopping the tomcat instance, or you use a session migration mechanism. -</p> - -</section> - <section name="Adding a new tomcat instance"> - - <p>1. Edit workers2.properties. Add a new channel. If you want, also add a worker.ajp entry - -but this is optional</p> - <p>2. Access the /jkstatus page or triger reloading with a program. You should see the -new channel displayed in the status page, and requests should start going to the new tomcat instance</p> - -</section> - <section name="Advanced: reconfiguration using JMX"> - - <p>This is very experimental. On tomcat side, you must enable the JMX proxy. This is done by -setting "modjk.webServerHost" and "modjk.webServerPort" in jk2.properties to point to the web server -port that contains /jkstatus. ( recent versions of jk and mod_jk are required ). You can also add mx4j-tools.jar to -server/lib and set "mx.enable=true" in jk2.properties to enable the console, or use your favorite JMX -console or tools. You could also select http and/or jrmp protocol, with mx.httpPort, mx.httpHost, mxjrmpPort -and mx.jrmpPort</p> - - <p>When tomcat starts up, it'll connect to the web server and create JMX mbean proxies for each -mod_jk component. The data will be refreshed when JMX operations are performed - a set or invoke will -allways refresh, while get will use cached values and refresh only periodically ( 5 sec default ).</p> - -<p>Every time a change is made, the config file will be written ( for persistence and to allow other -processes to get the same change ). The scoreboard will be changed, and then all other server processes will -act just like in the case of a file change. All comments will be lost - you should use "info" attributes -in components and set "disabled" to 1 if you want to temporary disable some components.</p> - - -</section> - <section name="Native server configuration"> - -<p>For Apache2 you can also use httpd.conf instead or in addition to workers2.properties. -Other servers may support similar configuration - for example using registry or their native -formats. This configuration mode is less tested - but provides some -unique advantages (and disadvantages )</p> - -<p>I'll describe the apache2 specifics, since this is the only one implemented. We use 2 directives - JkSet -is a top-level directive is used to set global config options, and JkUriSet is used to set options - for Location sections</p> - -<p>JkSet takes 2 parameters, the property name ( including component name ) and the value. (Note: -probably we should change it to 3 params, and separate the component name from property )</p> - -<p>Each Location that has a JkUriSet will automatically create a jk2 [uri] object, -using the Location path and the vhost. All JkUriSet directives will set attributes -in this [uri] object, exactly like properties in a ini file section</p> - -<p>You can mix workers2.properties and JkUriSet - for example workers and global options -can be set in worker2.properties, but all uri properties in httpd.conf. Some people -might preffer to have only one config file and use httpd.conf for all configuration.</p> - -<p>The biggest benefit is that Apache2 mapping is used instead of jk2 to detect the -requests that need to be sent to tomcat. Apache2 has been optimized and tuned to -server huge number of servers and uris - if you have only few the diference may be -hard to notice. Some people preffer to use the httpd.conf format and some tools -could be better used in this mode.</p> - -<p>One major problem is that reconfiguration is not supported if httpd.conf is used. -You can still enable/disable/add workers if you use workers2.properties, and -you could add or change uri properties in that file. </p> - -</section> - <section name="Config generators"> - -<p>There is work in progress to support automatic generation of the config file. The code is -included in org.apache.jk.config and consist of a number of ant tasks ( that work from CLI as well) - that process web.xml files and generate worker2.properties or server-specific config files</p> - -</section> - - -</document> diff --git a/xdocs/jk2/configwebcom.xml b/xdocs/jk2/configwebcom.xml deleted file mode 100644 index c15c871..0000000 --- a/xdocs/jk2/configwebcom.xml +++ /dev/null @@ -1,764 +0,0 @@ -<?xml version="1.0"?> -<document> -<copyright> - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -</copyright> - -<properties> - <title>Components</title> - - <author email="cmanola...@yahoo.com">Costin Manolache</author> - <author email="jfrederic.cl...@fujitsu-siemens.com">Jean-Frederic Clere</author> - <author email="yo...@apache.org">Yoav Shapira</author> -</properties> - -<section name="Intro"> - <p> - Each component instance has a name, that is used for configuration and at runtime. - Each component has a number of configurable properties. The following rules are used: - <ul> - <li>The name is composed from the type and a local part, separated with a ':' ( example: channel.unixsocket:/tmp/jk.socket ) </li> - <li>The 'type' consist of '.' and ascii characters. It is mapped to a JMX 'domain'. </li> - <li>The local part consists of ascii characters and .:/; - - <p> - Note that '=,' are not currently allowed - a future version may support the jmx syntax by using quotes to separate the local part from the property and value ( in .properties mode we must use '=' to separate the value from type, local name and property name ). - </p> - </li> - <li>The property is a simple name, with no dots. </li> - <li>A simple form of substitution is used in values, where $(property) will be replaced with a previously defined setting. If the property has ':' in it, it'll take the value from the object, if not it'll take the value from a global map. - </li> - </ul> - </p> -</section> - -<section name="Common properties"> - <p> - Common properties for all components - </p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>disabled</td> - <td>0 (false)</td> - <td>"disabled" state for the component, 1=true 0=false</td> - </tr> - <tr> - <td>debug</td> - <td>0 (false)</td> - <td>Debug level for the component, 0=disabled, 1..10 enabled. Higher levels - generate more debug information.</td> - </tr> - <tr> - <td>ver (short for, and formerly known as, version)</td> - <td>0</td> - <td>'Generation' of the component config. Important for runtime reconfiguration. - If you edit the config file or set the shmem properties, you need to also - upgrade the version of the modified component. The config layer will detect - the change and call the setter method.</td> - </tr> - </table> - </p> -</section> - - <section name="workerEnv"> - <p>This component represent the core jk2, it has the default logger for all other components. Is the central controller, it controls global properties -and provides access to all other objects</p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>logger</td> - <td>logger</td> - <td>Default loger used by jk2 components, can be changed in the config file, normally it defaults to "logger" the Alias for the default logger for the Server/platform.</td> - </tr> - <tr> - <td>sslEnable</td> - <td>1 (true)</td> - <td>Enable handling of SSL</td> - </tr> - <tr> - <td>timing</td> - <td>0</td> - <td>Will jk2 get request timing (needs APR?)</td> - </tr> - <tr> - <td>forwardKeySize</td> - <td>not set</td> - <td>Enable filling of javax.servlet.request.key_size</td> - </tr> - <tr> - <td>forwardURICompat</td> - <td>set</td> - <td>Pass the URI untouched.</td> - </tr> - <tr> - <td>forwardURICompatUnparsed</td> - <td>not set</td> - <td>Parse the URI until the '?'.</td> - </tr> - <tr> - <td>forwardURIEscaped</td> - <td>not set</td> - <td>Pass the URI escaped.</td> - </tr> - <tr> - <td>noRecoveryIfRequestSent</td> - <td>set</td> - <td>No recovery in LB mode if a Tomcat allready received the request.</td> - </tr> - <tr> - <td>noRecoveryIfHeaderSent</td> - <td>set</td> - <td>No recovery in LB mode if a Tomcat allready start to send reply to client.</td> - </tr> - </table> - </p> - <p>Only one of the forwardURI option could be used it replaces the default value.</p> - </section> - <section name="config"> - <p>The config component, hold the detail of the conifg system, such config file name, create global defines</p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>file</td> - <td>${serverRoot}/conf/workers2.properties</td> - <td>Location of the workers2.properties file</td> - </tr> - <tr> - <td>debug</td> - <td>0</td> - <td>Set the debug level of the config component</td> - </tr> - <tr> - <td>debugEnv</td> - <td>0</td> - <td>Set the debug level of the hidden env component </td> - </tr> - </table> - </p> - </section> - <section name="uriMap"/> - <section name="shm"> - <p>Shared memory descriptor</p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>file</td> - <td>No default value</td> - <td>Name of the file that will be mmapped to use as shared memory, If set to 'anonymous' use the anonymous shered memory</td> - </tr> - <tr> - <td>size</td> - <td>No default value</td> - <td>Deprecated. Size of the file.</td> - </tr> - <tr> - <td>slots</td> - <td>256</td> - <td>Number of shared memory slots. Set to the number of child processes</td> - </tr> - <tr> - <td>useMemory</td> - <td>0</td> - <td>Use process memory instead of shared memory. Useful for single child mpm's</td> - </tr> - </table> - </p> - </section> - <section name="uri"> - <p>A uri stores a pattern that is used - to match requests to workers, and asociated properties</p> - <p>If the uri name doesn't have a slash then it is considered as a virtual host - directive. Uri name can have a virtual host name and(or) port associated with. Format - of such a name is <b>hostname</b> or <b>hostname:port</b> where hostname - is virtual server name and the port is vitual server port number. The port number - is used only for the non default server ports.</p> - <p> - Special case is a default server named as <b>[uri:*]</b> that is used when the virtual - host cannot be found inside the configuration. All the uri directives not containing - host name belongs to this default server making global mappings. - </p> - <p> - Addition wild char scheme id <b>[uri:*:port]</b> that is used when you wish to - match any virtual host having specified (non-default) port number, like [uri:*:443]. - This will map all the virtual hosts no mather what is their name but that have port number 443. - </p> - <p> - The order how the host names are resolved is : - <ul> - <li>Exact host name and optional non default port number</li> - <li>Alias matching host name and port number</li> - <li>*:port if the port is other then default</li> - <li>Default server</li> - </ul> - </p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>group</td> - <td>lb:lb (The default loadbalancer)</td> - <td>Name of the tomcat group or worker that will process the request corresponding to the uri. This used - to be called 'worker'</td> - </tr> - <tr> - <td>context</td> - <td/> - <td>the context path for this uri component (webapp style).</td> - </tr> - <tr> - <td>servlet</td> - <td/> - <td>Servlet path for this mapping</td> - </tr> - <tr> - <td>alias</td> - <td/> - <td>server name alias. This setting should only be used for - host uris like [uri:myHost:myPort] ( i.e. no /) </td> - </tr> - </table> - </p> - </section> - <section name="vm"> - <p>Represents the JVM when used as inprocess container - </p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>JVM</td> - <td>(Autoguess)</td> - <td>JVM to use for this vm</td> - </tr> - <tr> - <td>OPT</td> - <td/> - <td>Option to pass to this vm, this is a multivalued property</td> - </tr> - <tr> - <td>classpath</td> - <td/> - <td>-Djava.class.path 0ption to pass to this vm, this is a multivalued property</td> - </tr> - </table> - </p> - </section> - <section name="channels"> - <p>A channel represents a transport protocol, connecting 2 -sides for RPC communication. The most common and standard is the tcp socket. -Other important channels are unix socket and jni</p> - <subsection name="channel.un"> - <p> - AF_UNIX socket. Only on UNIX like platform. These sockets are faster - than "normal" sockets but they are limited to the machine. -</p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>file</td> - <td>Name of socket</td> - <td>Name of the socket file (It is created by the Tomcat ChannelUn)</td> - </tr> - </table> - </p> - </subsection> - <subsection name="channel.socket"> - <p> - Defines a communication transport to a remote Servlet Engine. </p> - -<p>The name of the channels should be: channel.socket:HOST:PORT, where HOST and PORT are the -tomcat Ajp location. You could use other names and explicitely set HOST and PORT, but this -is discouraged. In most cases, you don't need to set any other config - just add a line like -[channel.socket:localhost:8009] and all other things will have good defaults. -</p> -<p> -NB: Starting with JK2 2.0.4, APR is mandatory and the channel.socket use APR (previously -called channel.apr). -</p> -<p> -Tomcat Engine must be set with jvmRoute="HOST:PORT", to match the default tomcatId of the channel. -</p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>port</td> - <td>extracted from the component name</td> - <td>Port where Tomcat is listening. It is automatically extracted from the name - you shouldn't have to specify it explicitely.</td> - </tr> - <tr> - <td>host</td> - <td>extracted from the component name</td> - <td>Remote host. You should use the name, no need to override it</td> - </tr> - <tr> - <td>graceful</td> - <td>0</td> - <td>If 1, only requests for existing sessions will be forwarded</td> - </tr> - <tr> - <td>keepalive</td> - <td>0</td> - <td>? </td> - </tr> - <tr> - <td>timeout</td> - <td>0 (infinite)</td> - <td>Socket timeout for sending and receiving</td> - </tr> - <tr> - <td>ndelay</td> - <td>0</td> - <td>If set to 1 Disables the Nagle algorithm for send coalescing</td> - </tr> - <tr> - <td>lb_factor</td> - <td>1</td> - <td>Load balancing factor to use. The lower the lb_factor the more often that tomcat will get requests but see - "level" below.</td> - </tr> - <tr> - <td>level</td> - <td>1</td> - <td>Worker Priority. Valid values are 0-3. The functioning workers with the lowest level - will be checked for the lowest lb_value, and if found will be run. The upper level workers are - only checked upon failure of all workers on ALL of the levels below them. This is very - useful for implementing failover withing a cluster. You could set the tomcat server local - on the same machine as the apache instance to level 0 and all of the other workers to level 1. - This would cause apache to only use the external tomcats when the local tomcat is down.</td> - </tr> - <tr> - <td>group</td> - <td>lb</td> - <td>loadbalanced groups to which this channel and the associated worker will be added, multivalued. You need to set it only if you have an advanced setup with multiple clusters.</td> - </tr> - <tr> - <td>tomcatId</td> - <td>Automatically set to the localname ( host:port )</td> - <td>Must match the JVM route on tomcat the server.xml Engine element, for load balancing</td> - </tr> - <tr> - <td>route</td> - <td>Automatically set to the localname ( host:port )</td> - <td>Same as tomcatId</td> - </tr> - </table> - </p> - </subsection> - <subsection name="channel.jni"> - <p>The jni channel, used if tomcat is started inprocess</p> - </subsection> - </section> - <section name="workers"> - <p> - For the moment 4 worker types are supported: worker.jni,ajp13,status,lb. - </p> - <subsection name="worker.jni"> - <p>worker used in inprocess, holds the details of the Tomcat class to startup, and parameters to pass</p> - <p>There are two predefined jni workers <b>onStartup</b> and <b>onShutdown</b>. Those two workers are executed - during startup and shutdown phase of the connector. Both must exists in the configuration to be able to start - and shutdown Tomcat. - </p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>class</td> - <td>org/apache/jk/apr/TomcatStarter</td> - <td>class that holds the main method called to start tomcat</td> - </tr> - <tr> - <td>ARG</td> - <td/> - <td>Arguments to pass to main method when called</td> - </tr> - <tr> - <td>stdout</td> - <td>NULL</td> - <td>file to redirect Standard output from the java process</td> - </tr> - <tr> - <td>stderr</td> - <td>NULL</td> - <td>file to redirect Standard output from the java process </td> - </tr> - </table> - </p> - </subsection> - <subsection name="ajp13"> - <p>Default worker. If a property is in both the worker and the channel, you only need to define it in one place. - The channel passes down the properties to its worker. (at least in the ajp13-channel.socket linkage)</p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>secretkey</td> - <td>NULL</td> - <td> - <b>Magic:</b> The secret key will be set automatically on the associated - worker. - </td> - </tr> - <tr> - <td>tomcatId</td> - <td>Automatically set to the localname ( host:port )</td> - <td>Must match the JVM route on the tomcat server.xml Engine element, for load balancing</td> - </tr> - <tr> - <td>route</td> - <td>Automatically set to the localname ( host:port )</td> - <td>Same as tomcatId</td> - </tr> - <tr> - <td>group</td> - <td>lb</td> - <td>loadbalanced groups to which this channel and the associated worker will be added, multivalued. You need to set it only if you have an advanced setup with multiple clusters.</td> - </tr> - <tr> - <td>lb_factor</td> - <td>1</td> - <td>Load balancing factor to use. The lower the lb_factor the more often that tomcat will get requests but see - "level" below.</td> - </tr> - <tr> - <td>level</td> - <td>1</td> - <td>Worker Priority. Valid values are 0-3. The functioning workers with the lowest level - will be checked for the lowest lb_value, and if found will be run. The upper level workers are - only checked upon failure of all workers on ALL of the levels below them. This is very - useful for implementing failover withing a cluster. You could set the tomcat server local - on the same machine as the apache instance to level 0 and all of the other workers to level 1. - This would cause apache to only use the external tomcats when the local tomcat is down.</td> - </tr> - <tr> - <td>channel</td> - <td/> - <td>Communication channel used by the worker. Use the full name of the channel (everything between the []'s).</td> - </tr> - <tr> - <td>max_connections</td> - <td>0 (unlimited)</td> - <td>Maximum number of currently used endpoints. - If the specified number is reached then the load balancer has the chance - to try another worker. This is very useful in situations when having multiple - servers and you wish to finer grade the lb_factor. - </td> - </tr> - <tr> - <td>connectTimeout</td> - <td>0 (no timeout)</td> - <td>With such timeout set, the web-server will send a CPING request just after physical connect to the remote Tomcat - and will wait for a CPONG reply for the connectTimeout milliseconds, a guarantee that the remote Tomcat is not hang. - Side effect, this round trip add a little delay at connection time and require a recent AJP13 implementation, - with support for CPING/CPONG command. - </td> - </tr> - <tr> - <td>replyTimeout</td> - <td>0 (no timeout)</td> - <td>With such timeout set, the web-server will wait for Tomcat reply to a forwarded request for replyTimeout milliseconds. - Another guarantee that the remote Tomcat is not hang. - Warning, if you have 'normal' long running processes on Tomcat side, you shouldn't use this feature to avoid - invalid errors reports or set the timeout accordingly. - </td> - </tr> - <tr> - <td>prepostTimeout</td> - <td>0 (no timeout)</td> - <td>With such timeout set, the web-server will send a CPING request just before forwarding the request to the remote Tomcat - and will wait for a CPONG reply for the prepostTimeout milliseconds, a guarantee that the remote Tomcat is not hang. - Side effect, this round trip add a little delay in forwarding request and require a recent AJP13 implementation, - with support for CPING/CPONG command. - </td> - </tr> - </table> - </p> - </subsection> - <subsection name="status"> - <p>An optional worker that outputs (HTML) pages with useful information to monitor JK2.</p> - <p>To create the worker, add a [status:] or [status:'a name'] section.</p> - <p>The status worker needs no 'local' name, although one can be used if desired.</p> - <p>To access the worker, add a [uri] section with the group= assigned to this worker.</p> - <p>The status worker has the following additional properties: - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>styleMode</td> - <td>0 (None)</td> - <td>Defines if or how the status worker will apply a Style Sheet to returned pages.</td> - </tr> - <tr> - <td>stylePath</td> - <td>NULL</td> - <td>For styleMode=2 or 3, where to find the Style Sheet file.</td> - </tr> - </table> - </p> - <p>The syleMode setting accepts the following values: - <table> - <tr> - <th>styleMode value</th> - <th>Description</th> - </tr> - <tr> - <td>0</td> - <td>No Style settings are used. (Default)</td> - </tr> - <tr> - <td>1</td> - <td>Use the built-in Default Style Sheet. It is presented as an 'Internal Style Sheet' to HTML pages.</td> - </tr> - <tr> - <td>2</td> - <td>Use stylePath as a URI context to an external Style Sheet file to be returned by the Web Server.</td> - </tr> - <tr> - <td>3</td> - <td>Use stylePath as a file-system reference to a Style Sheet file. It is presented as an 'Internal Style - Sheet' to HTML pages.</td> - </tr> - </table> - </p> - <p>If the stylePath has not been set, styleMode=2 and 3 are ignored.</p> - <p>The sylePath setting accepts the following values: - <table> - <tr> - <th>styleMode value</th> - <th>stylePath Description</th> - </tr> - <tr> - <td>2</td> - <td>A URI context to a file (e.g /styles/jkstatus.css). It must begin with '/' and include the file name.</td> - </tr> - <tr> - <td>3</td> - <td>A file-system path (suitable for the OS in use) plus file name. Also ${serverRoot}/conf/'file name' - allows the file to be located in Apache's conf directory.</td> - </tr> - </table> - </p> - <p>If the Style file cannot be found, Mode 2 and 3 record Apache log entries.</p> - <p>For styleMode=2 and 3, changes in the Style Sheet are effective on the next access to the status worker.</p> - </subsection> - <subsection name="lb"> - <p>Loadbalanced worker</p> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>worker</td> - <td/> - <td/> - </tr> - <tr> - <td>noErrorHeader</td> - <td>1 (true)</td> - <td>If set, jk2 won't touch the headers in case of error and will let for example Apache present the ErrorDocument via mod_alias. - </td> - </tr> - <tr> - <td>noWorkerMsg</td> - <td/> - <td/> - </tr> - <tr> - <td>noWorkerCode</td> - <td>503</td> - <td/> - </tr> - <tr> - <td>hwBalanceErr</td> - <td/> - <td/> - </tr> - <tr> - <td>timeout</td> - <td>0 (disabled)</td> - <td>If all the workers are in the error state, probably by Tomcat -refusing any new connections due to the overload, you can set the timeout forcing lb to wait that some -worker becomes available, instead of immediately returning error to the client. This is very useful in -situations with high peek load. The timeout should be set to the maximum application call time, but -not less then 1 second. - </td> - </tr> - <tr> - <td>attempts</td> - <td>3</td> - <td>Number of attempts that lb will try on each worker before - giving up. - </td> - </tr> - <tr> - <td>recovery</td> - <td>60 (seconds)</td> - <td>Time to wait before retrying to see if the worker came out - of the error state. - </td> - </tr> - <tr> - <td>stickySession</td> - <td>1 (true)</td> - <td>Sessions stick to the same worker, 1=true 0=false - </td> - </tr> - </table> - </p> - </subsection> - </section> - <section name="loggers"> - <p>Any connector based on jk2, at least has a default logger, that can be reached using the "logger" alias, the logger used is the more appropiate for the plataform/server combination, Apache2 under in any platform has logger.apache2 as default, IIS on his only platform uses logger.win32, and Any apache 1 install uses logger.file as default.., the config file lets you change that defaults, you can end using logger.file in IIs i.e</p> - <p>The properties shared by all loggers are: -<table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>level</td> - <td>INFO</td> - <td>Text of the log level. Strings supported: EMERG, ERROR, INFO, DEBUG</td> - </tr> - </table> - </p> - <subsection name="logger.file"> - <p> - <table> - <tr> - <th>Property name</th> - <th>Default</th> - <th>Description</th> - </tr> - <tr> - <td>file</td> - <td>${serverRoot}/logs/jk2.log</td> - <td> - Log file. XXX you may be able to change this at runtime, - to implement rolling. - </td> - </tr> - </table> - </p> - </subsection> - <subsection name="logger.win32"> - <p>logger used in the IIS server by default, it ends at native Application Event Log.</p> - </subsection> - <subsection name="logger.apache2"> - <p>Logger used in Apache2 servers, it normally in ends in error.log </p> - </subsection> - </section> - <section name="How Load Balancing Works"> - <p>The lb_factor and level properties combine to deliver a flexible static load balancing solution. - The level property is used to create up to four pools over workers in descending priority and lb_factor - is used to weight the workers within a pool. The lower the level the more likely the worker is to be used - and the lower the lb_factor the more likely the worker is to be used. Here is how the algorithm is - currently implemented:</p> - <p> -(Assume that every worker's lb_value is set to their lb_factor)<br/> -<br/><source> -if (loadbalancer has a route) and (stickysession=1){<br/> - worker= loadbanlancer.getWorkerForRoute(route)<br/> - if worker.hasRedirect<br/> - redirect=worker.redirect<br/> - else if !worker.hasError<br/> - return worker<br/> - }<br/> -<br/> -selectedWorker=null<br/> -foreach lb_level {<br/> - foreach worker in the level {<br/> - if worker.isNotWorking<br/> - continue<br/> - if selectedWorker == null<br/> - selectedWorker = worker<br/> - continue<br/> - if worker.lb_value < selectedWorker.lb_value<br/> - selectedWorker = worker<br/> - continue<br/> - }<br/> - if selectedWorker !=null<br/> - break<br/> -}<br/> -<br/> -Reenable workers in error state if the timeout has passed()<br/> -<br/> -if selectedWorker !=null {<br/> - selectedWorker.lb_value += selectedWorker.lb_factor<br/> - if selectedWorker.lb_value > 255 {<br/> - foreach worker in load_balancer.workers[selectedWorker.level]<br/> - worker.lb_value=worker.lb_factor<br/> - }<br/> - }<br/> - return selectedWorker<br/> -}<br/></source> -</p> - - </section> -</document> diff --git a/xdocs/jk2/configwebex.xml b/xdocs/jk2/configwebex.xml deleted file mode 100644 index 27b4417..0000000 --- a/xdocs/jk2/configwebex.xml +++ /dev/null @@ -1,108 +0,0 @@ -<?xml version="1.0"?> -<document> -<copyright> - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -</copyright> -<properties> -<title>Examples</title> -<author email="cmanola...@yahoo.com">Costin Manolache</author> -<author email="jfrederic.cl...@fujitsu-siemens.com">Jean-Frederic Clere</author> -</properties> - <section name="Sockets"> - <p> -The examples below are working when the Tomcat is configured according the -examples described in the configtc file. -</p> - <subsection name="/example using normal socket"> - <p> -Map /examples to the Tomcat /examples context using a normal socket. Note the -IP instead localhost (The JVM listens on the IPV4 address not no the IPV6). -</p> - <p> - <source> -[shm] -file=${serverRoot}/logs/shm.file -size=1048576 - -# Example socket channel, override port and host. -[channel.socket:localhost:8019] -port=8019 -host=127.0.0.1 - -# define the worker -[ajp13:localhost:8019] -channel=channel.socket:localhost:8019 - -# Uri mapping -[uri:/examples/*] -worker=ajp13:localhost:8019 -</source> - </p> - </subsection> - <subsection name="/jkstatus"> - <p> -Map /jkstatus to the status worker. -</p> - <p> - <source> -[shm] -file=${serverRoot}/logs/shm.file -size=1048576 - -# define the worker -[status:status] - -# Uri mapping -[uri:/jkstatus/*] -worker=status:status -</source> - </p> - </subsection> - <subsection name="/example using AF_UNIX socket"> - <p> -Map /examples to the Tomcat /examples context using a AF_UNIX socket. -Socket file is create by the Tomcat becarefull when the Web Server runs in -a different user than the Tomcat with the permission of the socket file: -<source> -apache20@jfcexpert:~/apache> ls -l /home1/jakarta/jakarta-tomcat-4.1/dist/work/jk2.socket -srw-rw---- 1 jakarta jakarta 0 Jun 20 08:27 /home1/jakarta/jakarta-tomcat-4.1/dist/work/jk2.socket -</source> -Here the Tomcat user and the Web Server user must be in the same group. -</p> - <p> - <source> -[shm] -file=${serverRoot}/logs/shm.file -size=1048576 - -# Example unixsocket channel. -[channel.un:unixsocket] -file=/home1/jakarta/jakarta-tomcat-4.1/dist/work/jk2.socket - -# define the worker -[ajp13:unixsocket] -channel=channel.un:unixsocket - -# Uri mapping -[uri:/examples/*] -worker=ajp13:unixsocket -</source> - </p> - </subsection> - </section> - <section name="JNI"> - </section> -</document> diff --git a/xdocs/jk2/davhowto.xml b/xdocs/jk2/davhowto.xml deleted file mode 100644 index 6b13e11..0000000 --- a/xdocs/jk2/davhowto.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<document> -<properties> -<title>Apache 2.x/mod-dav - Tomcat/jk2 - HOWTO</title> -<author email="jfrederic.cl...@fujitsu-siemens.com">Jean-Frederic Clere</author> -<date>Wed Mar 3 10:31:06 CET 2004</date> -</properties> -<section name="Purpose"> -<p> -Use mod_dav to modify JSP pages. -</p> -</section> - -<section name="extract of httpd.conf"> -<p> -The Alias is just for confort ;-) -<source> - Alias /examples/jsp-source /home/jfclere/jakarta-tomcat-4.1.24/webapps/examples/jsp - <Location /examples/jsp-source> - Dav On - - AuthType Basic - AuthName DAV - AuthUserFile user.passwd - - <LimitExcept GET OPTIONS> - require user admin - </LimitExcept> - </Location> - - <LocationMatch "/*.jsp"> - JkUriSet worker ajp13:localhost:8009 - </LocationMatch> - -</source> -The LocationMatch only maps the *.jsp files. -To have also the images it is possible to the DefaultServlet by mapping /examples. -<source> - <Location /examples> - JkUriSet worker ajp13:localhost:8009 - </Location> -</source> -Or to get the images served by httpd and not by Tomcat. -<source> - Alias /examples/images /home/jfclere/jakarta-tomcat-4.1.24/webapps/examples/images -</source> -<source> -</source> -</p> -</section> -<section name="extract of workers2.properties"> -<p> -The worker ajp13:localhost:8009 of the JkUriSet Directive has to be defined -in workers2.properties. -<source> -# Example socket channel, override port and host. -[channel.socket:localhost:8009] -port=8009 -host=127.0.0.1 - -# define the worker -[ajp13:localhost:8009] -channel=channel.socket:localhost:8009 -</source> -</p> -</section> -</document> diff --git a/xdocs/jk2/installhowto.xml b/xdocs/jk2/installhowto.xml deleted file mode 100644 index 5883a52..0000000 --- a/xdocs/jk2/installhowto.xml +++ /dev/null @@ -1,261 +0,0 @@ -<?xml version="1.0"?> -<document> -<copyright> - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -</copyright> - -<properties> - <title>Installation of jk2 in the Web Server</title> - - <author email="jfrederic.cl...@fujitsu-siemens.com">Jean-Frederic Clere</author> - <author email="a...@tagish.com">Andy Armstrng</author> - <author email="yo...@apache.org">Yoav Shapira</author> -</properties> - - <section name="Installation"> - <p> - The actual build mechanism creates the dso files in the - build/jk2/${servername} subdirectory of the jakarta-tomcat-connectors/jk. - When configure --with-jni is used 2 dso files are created. - These files have to be copied in the right location of the web server - installation. - </p> - <p> - JNI support in JK2 require APR, which is provded in Apache 2.0, and is - available for many platforms, so Apache 1.3 and IIS should be able to - use it. - </p> - <subsection name="Apache 1.3"> - <p> - In the following example Apache-1.3 is installed in - /home/apache13/ and the commands are executed in - the jakarta-tomcat-connectors directory. - </p> - <p> - Apache 1.3 require APR, and if APR has been built with pthread support - and your Apache 1.3 wasn't (general case in Unix platforms) you should : - <ul> - <li> - Rebuild Apache 1.3 with pthread support (recommanded) - </li> - <li> - Add the LoadFile /usr/lib/pthread.so in beginning of your httpd.conf - </li> - </ul> - </p> - <p> - You should also ensure that the linker will be able to locate the apr shared libraries, - <code>libapr.so</code>, and <code>libaprutil.so</code>, make sure they have been installed - in linker search locations. - </p> - <screen> - <note>Copy the dso files in the modules location:</note> - <type>cp jk/build/jk2/apache13/mod_jk2.so /home/apache13/modules</type> - <note>Copy jkjni.so if you're using JNI</note> - <type>cp jk/build/jk2/apache13/jkjni.so /home/apache13/modules</type> - <note>You may have to add pthread library in the httpd.conf:</note> - <read>LoadFile /usr/lib/pthread.so</read> - <note>Add mod_jk2 loading in the httpd.conf</note> - <read>LoadModule jk2_module modules/mod_jk2.so</read> - </screen> - </subsection> - <subsection name="Apache 2"> - <p> - In the following example Apache-2.0 is installed in - /home/apache20/apache40 and the commands are executed in - the jakarta-tomcat-connectors directory. - </p> - <screen> - <note>Copy the dso files in the modules location:</note> - <type>cp jk/build/jk2/apache2/mod_jk2.so /home/apache20/apache40/modules</type> - <note>Copy jkjni.so if you're using JNI</note> - <type>cp jk/build/jk2/apache2/jkjni.so /home/apache20/apache40/modules</type> - <note>Add mod_jk2 loading in the httpd.conf:</note> - <read>LoadModule jk2_module modules/mod_jk2.so</read> - </screen> - </subsection> - <subsection name="IIS"> - <p>A pre-built version of the ISAPI redirector server plugin, isapi_redirector2.dll, - is available under the win32/i386 directory of jakarta-tomcat-connectors distribution. - You can also build a copy locally from the source present in jakarta-tomcat-connectors - distribution.<br />The Tomcat redirector requires three entities: - <ul> - <li> - <b>isapi_redirector2.dll</b> - The IIS server plugin, either obtain a pre-built DLL or build it yourself (see the build section). - </li><li> - <b>workers2.properties</b> - A file that describes the host(s) and port(s) used by the workers (Tomcat processes). - A sample workers2.properties can be found under the conf directory. - </li><li> - <b>jk2.properties</b> - A configuration file used by mod_jk2 on the Tomcat side. - </li> - </ul> - </p> - <p> - <ol><li>In the registry, create a new registry key named - <b>"HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\2.0"</b> - </li><li> - Add a string value with the name <b>serverRoot</b> and a value which is a full path - to your Tomcat installation (for example <b>c:\jakarta-tomcat</b>). If Tomcat is installed - on a different server, this entry must point to the location (directory) where the - workers2.properties file resides. - </li><li> - Add a string value with the name <b>extensionUri</b> and a value of <b>/jakarta/isapi_redirector2.dll</b> - </li><li> - Add a string value with the name <b>workersFile</b> and a value which is the full path - to your workers2.properties file (for example <b>c:\jakarta-tomcat\conf\workers2.properties</b>) - </li><li> - Add a string value with the name <b>logLevel</b> and a value for your log level - (can be DEBUG, INFO or ERROR). - </li><li>Using the IIS management console, add a new virtual directory to your IIS web site. - The name of the virtual directory must be jakarta. - Its physical path should be the directory where you placed isapi_redirector2.dll - While creating this new virtual directory assign it with execute access. - </li><li> - Using the IIS management console, add isapi_redirector2.dll as a filter in your IIS web site. - The name of the filter should reflect its task (I use the name jakarta), - its executable must full path to the isapi_redirector2.dll. - </li> - </ol> - </p> - <p>Install using provided script <b>install4iis.js</b><br/> - This script creates the virtual directory and installs ISAPI filter for Default webserver<br/> - <i>C:\Program Files\Apache Software Foundation\Tomcat 5.0</i> - <screen> - <note>Open the command prompt and cd to bin folder</note> - <type>cd C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin</type> - <note>Copy the isapi_redirector2.dll and install4iis.js to that folder</note> - <type>cscript install4iis.js</type> - </screen> - </p> - <p> - You may modify the default installation using various command line options. - To see what the options are type <b>csrcipt install4iis.js -h</b> - </p> - <p> - That's all, you should now start Tomcat and ask IIS to serve you the /examples context. - Try <a href="http://localhost/examples/jsp/index.html">http://localhost/examples/jsp/index.html</a> for example and - execute some of the JSP examples. - </p> - </subsection> - <subsection name="Lotus Domino"> - <p><i>At the time of writing these instruction are applicable to Windows only. - As soon as there are versions of the Domino redirector available for other - platforms these instructions will be updated.</i></p> - - <p>If necessary build dsapi_redirector2.dll as per the instructions in the - jk/native2/server/dsapi directory. Copy the DLL into the Domino program - directory (this is the directory, which may be called something like - C:\Lotus\Domino, that contains a file called nlnotes.exe). Shortly we will - tell Domino where to find this file, but before we do that we need to make - some registry entries. The simplest way is to edit the supplied file - dsapi_redirector2.reg, which initially will look like this</p> - - <screen> - <read>Windows Registry Editor Version 5.00</read> - <read></read> - <read>[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Dsapi Redirector\2.0]</read> - <read>"serverRoot"="D:\\Works\\Tomcat\\jakarta-tomcat-4.1.27"</read> - <read>"workersFile"="conf\\workers2.properties"</read> - <read>"tomcatStart"="bin\\startup.bat"</read> - <read>"tomcatStop"="bin\\shutdown.bat"</read> - <read>"tomcatTimeout"="30000"</read> - </screen> - - <p>Change serverRoot to reflect the location of your Tomcat installation. The - other filename parameters can either be relative to serverRoot or absolute - paths. Once edited double click on dsapi_redirector2.reg to enter it into the - registry.</p> - - <p><b>Starting Tomcat:</b> The last three registry entries above provide - commands that the redirector DLL will use to start and stop Tomcat when the - Domino http server starts and stops respectively. If you don't require this - behaviour these two lines can be omitted (or deleted if you've already placed - them in the registry).</p> - - <p><b>The Workers file:</b> If necessary take the sample workers2.properties - file from jakarta- tomcat- connectors\jk\conf and place it in the location - specified in the registry settings above (typically the conf directory of your - Tomcat installation). Edit the file to suit your Tomcat setup.</p> - - <p><b>Configuring Domino:</b> Finally we need to configure Domino to use the - DSAPI extension DLL. For those who are unfamiliar with Domino server - configuration most of a server's configurable behavior is dictated by a - document called the "server document" in a database called the "Public Name - and Address Book" or "NAB" for short (N.B. Lotus have renamed the NAB to - "Domino Directory" from Domino 5 onwards). Each Domino server will have a NAB - (called names.nsf) and each NAB will have a number of server documents - including one for the current server. If you have not previously configured a - Domino server you may need to refer to the supplied documentation, or you may - need to pass this document to your tame Domino administrator.</p> - - <p>Assuming you know your way around a Domino server document what we're going - to do is actually quite simple. Open the server document for this server, - place it in Edit mode, then locate the DSAPI section and the 'DSAPI filter - file names' field on the Internet Protocols tab, HTTP sub- tab. Add - "dsapi_redirector2.dll" to the DSAPI field, then save and close the - document.</p> - - <p><b>Restart Domino:</b> In order to get these settings to take effect and - make sure that you haven't disrupted anything else you should now restart the - Domino server. If the server is running as a service and you have changed any - relevant system variables (JAVA_HOME, TOMCAT_HOME, CLASSPATH) since the last - time you restarted the computer you should do a complete restart now because - updates to system variables are not seen by services until after a reboot. If - all goes well you should see something like this on the server console when - the web server starts up.</p> - - <screen> - <read>14/11/2003 13:02:18 Attempting to start Tomcat: D:\...\startup.bat</read> - <read>Using CATALINA_BASE: D:\Works\Tomcat\jakarta-tomcat-4.1.27</read> - <read>Using CATALINA_HOME: D:\Works\Tomcat\jakarta-tomcat-4.1.27</read> - <read>Using CATALINA_TMPDIR: D:\Works\Tomcat\jakarta-tomcat-4.1.27\temp</read> - <read>Using JAVA_HOME: C:\JBuilder8\jdk1.4</read> - <read>14/11/2003 13:02:18 Apache Tomcat Interceptor (Jakarta/DSAPI/2.0.0) loaded</read> - <read>14/11/2003 13:02:19 HTTP Web Server started</read> - </screen> - - <p>At about the same time Tomcat should open in a new window (assuming you - enabled the autostart option in the registry settings). You should now be able - to visit a URL that is handled by Tomcat. Something like</p> - - <p><code>http://name-of-server/servlet/SnoopServlet</code></p> - - <p>may be available, depending on how Tomcat is configured. If that all works - you're done.</p> - - <p><b>Mailing Lists:</b> There are two mailing lists dedicated to the Domino - Tomcat redirector:</p> - - <p><a href="http://nomen.tagish.co.uk/mailman/listinfo/domino-tomcat-l">domino-tomcat-l</a></p> - - <p><b>domino-tomcat-l</b> is a general discussion list for issues with the - redirector and also wider Tomcat/Domino integration issues such as calling the - Domino Java API from a Tomcat servlet. This list is fairly low volume so - please subscribe if you're actively using the redirector. If you have an issue - with the redirector please post it to the list where it will be seen not only - by the author but by other users who may be able to help with any problems.</p> - - <p><a href="http://nomen.tagish.co.uk/mailman/listinfo/domino-tomcat-announce-l">domino-tomcat-announce-l</a></p> - - <p><b>domino-tomcat-announce-l</b> is for announcements about the Domino Tomcat - redirector. Mainly this list will be used for new releases but serious - bugs will also be posted to it. This list will be very low volume; not more than - a few posts per month. For this reason if you'd like to keep track of new redirector versions - please subscribe to this list.</p> - - </subsection> - </section> -</document> diff --git a/xdocs/jk2/vhosthowto.xml b/xdocs/jk2/vhosthowto.xml deleted file mode 100644 index 1ccc194..0000000 --- a/xdocs/jk2/vhosthowto.xml +++ /dev/null @@ -1,610 +0,0 @@ -<?xml version="1.0"?> -<document> -<copyright> - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -</copyright> -<properties> -<title>Apache 2.0.43 - Tomcat 4.1.12 - jk2 - virtual host HOWTO</title> -<author email="unicoletti at prometeo.it">Umberto Nicoletti</author> -<date>Tue 22 Oct 2002 11:58:28 AM GMT-5</date> -</properties> -<section name="Scenario"> -<ul> -<li>RedHat Linux 7.2</li> -<li>Latest 1.4.x Sun JDK</li> -<li>Tomcat 4.1.12 binary</li> -<li>Apache 2.0.43 built from source</li> -<li>jk2 connector binary from jakarta.apache.org</li> -</ul> -</section> - -<section name="Requirements"> -<p> -Deploy three (in my case) web applications under three different virtual hosts, -making the default vhost -respond to any name and to the bare IP address. -</p> -</section> - -<section name="Installing JDK"> - <p>Note: download the jdk, not just the jre!</p> -<screen> -<note> -Uncompress the jdk somewhere in the filesystem. -I chose /usr/local/: -</note> -<type> -ll /usr/local/ -</type> -<read> -drwxr-xr-x 9 root root 4096 Oct 18 16:37 j2sdk1.4.1_01 -</read> -<read> -lrwxrwxrwx 1 root root 14 Oct 18 16:38 java -> j2sdk1.4.1_01/ -</read> -</screen> -<p> -make a symlink named java to j2sdk1.4.1_01/ so that you can -easily switch back and forth -between different jvms. We will use the same trick for apache and tomcat afterwards. -</p> -<p> -Now tell your bash shell where to find java binaries: create a file named java.sh in -/etc/profile.d with the following content: -</p> -<screen> -<type> -cat /etc/profile.d/java.sh -</type>type> -<read># set java environment</read> -<read></read> -<read>export JAVA_HOME=/usr/local/java</read> -<read>export PATH=$PATH:$JAVA_HOME/bin</read> -<read></read> -<read>export CLASSPATH=$JAVA_HOME/lib</read> -</screen> -<p> -do a chmod: -</p> -<screen> -<note> -Make java.sh readable and executable by anyone: -</note> -<type> -#chmod 755 /etc/profile.d/java.sh -</type> -</screen> -Now open a new shell and try this: -<screen> -<type> -which java -</type> -<read> -/usr/local/java/bin/java -</read> -</screen> -<p> -You should get the answer given above. If not chek your environment and make -sure that java.sh is executed -when opening a new shell. -Try to run a java program or the following: java -version. -</p> -<p> -If you don't like this way of installing java please ignore it. - -Make sure everything is ok and then jump to the next step. -</p> -</section> - -<section name="Installing Apache"> -<p> -Download the latest release, uncompress it, cd into the newly created directory -and run the following: -</p> -<screen> -<type> -./configure -prefix=/usr/local/apache2.0.43 --sysconfdir=/etc/apache --localstatedir=/var --enable-so -</type> -</screen> -<p> -Of course you can customize the installation specifying other modules to enable -or whatever you like. -Just don't forget to ENABLE-SO, because that's what you need to load the -apache-tomcat connector. -</p> -<p> -Run make and make install. Create the log directories and others (you can skip -this if you know how -to configure where apache puts its log files -> edit httpd.conf): -</p> -<screen> -<type> -#mkdir /var/logs -</type> -<type> -#mkdir /usr/local/apache2.0.43/conf -</type> -<type> -#mkdir /usr/local/apache2.0.43/logs -</type> -</screen> -<p> -Create the symlink /usr/local/apache to /usr/local/apache2.0.43 and test your -installation -by executing: -</p> -<screen> -<type> -#/usr/local/apache/bin/apachectl start -</type> -</screen> -<p> -Open a browser and point it to the linux box: you should get a page telling you -that the apache installation -was successful. -If that doesn't happen check the logs and troubleshoot: common errors in this configuration -are that some directory holding log or configuration files is missing or maybe you have another web -server listening on port 80. -</p> -</section> - -<section name="Installing Tomcat"> -<p> -Uncompress the tomcat binaries in a directory of your choice. In this howto we -will use /opt. -Create a symlink named jakarta to the newly created directory so that you have -something like the following: -</p> -<screen> -<type> -ll /opt/ -</type> -<read>total 4</read> -<read>lrwxrwxrwx 1 root root 31 Oct 18 16:38 jakarta ->jakarta-tomcat-4.1.12-LE-jdk14/</read> -<read>drwxr-xr-x 12 root root 4096 Oct 18 18:10 jakarta-tomcat-4.1.12-LE-jdk14</read> -<note> -Start tomcat by running: -</note> -<type> -/opt/jakarta/bin/startup.sh -</type> -</screen> -<p>After a -few seconds point your browser at the IP of -the linux box on port 8080 and you should see the tomcat welcome page. -If not check the catalina.out log file in /opt/jakarta/logs and fix all errors -until Tomcat comes up. -</p> -</section> - -<section name="Configuring Tomcat to listen to Apache ajp13 requests"> -<p> -Here is a sample server.xml file. Please note that the location of directories -and log files is absolutely -arbitrary and you have to edit it to make it suit your needs. -<source> -<!-- Umberto Server Configuration File --> - -<Server port="8005" shutdown="SHUTDOWN" debug="0"> - <!-- Define an Apache-Connector Service --> - - <Service name="Tomcat-Apache"> - - <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --> - <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" - port="8009" minProcessors="5" maxProcessors="75" - enableLookups="true" redirectPort="8443" - acceptCount="10" debug="0" connectionTimeout="20000" - useURIValidationHack="false" - protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/> - - <Engine name="Apache" defaultHost="www.home.net" debug="0"> - - <Logger className="org.apache.catalina.logger.FileLogger" - prefix="apache_log." suffix=".txt" - timestamp="true"/> - <!-- Access log processes all requests for this virtual host. --> - <Valve className="org.apache.catalina.valves.AccessLogValve" - directory="logs" prefix="localhost_access_log." suffix=".txt" - pattern="common" resolveHosts="false"/> - - <Host name="www.home.net" debug="0" -appBase="/opt/jakarta-tomcat-4.1.12-LE-jdk14/webapps/struts-example" - unpackWARs="true" autoDeploy="true"> - <Alias>localhost</Alias> - <Alias>www</Alias> - <Alias>10.0.0.10</Alias> - - - <Context path="" docBase="" debug="1"/> - - <Valve className="org.apache.catalina.valves.AccessLogValve" - directory="logs" prefix="home_access_log." suffix=".txt" - pattern="common" resolveHosts="false"/> - </Host> - - <Host name="www.customer1.it" debug="0" -appBase="/opt/jakarta-tomcat-4.1.12-LE-jdk14/webapps/struts-blank" - unpackWARs="true" autoDeploy="true"> - - <Context path="" docBase="" debug="1"/> - - <Valve className="org.apache.catalina.valves.AccessLogValve" - directory="logs" prefix="cust1_access_log." suffix=".txt" - pattern="common" resolveHosts="false"/> - </Host> - - <Host name="www.customer2.net" debug="0" -appBase="/opt/jakarta-tomcat-4.1.12-LE-jdk14/webapps/root" - unpackWARs="true" autoDeploy="true"> - - <Context path="" docBase="" debug="1"/> - - <Valve className="org.apache.catalina.valves.AccessLogValve" - directory="logs" prefix="cust2_log." suffix=".txt" - pattern="common" resolveHosts="false"/> - </Host> - - </Engine> - - </Service> - -</Server> -</source> - -This is a very minimalistic conf file, because we have taken away the HTTP1.1 -connector that allows us to talk directly to Tomcat. -It might not be good for development, but it should be good for production. -If you feel like you need also the Tomcat Standalone service then copy and paste -it from your original server.xml file -(you did back it up, didn't you?). -<br/> -Try to start tomcat again and check catalina.out to see if everything is up and -running. If it complains about -missing apr stuff try to edit /opt/jakarta/conf/jk2.properties and make it look so: - -<source> -# list of needed handlers. -handler.list=channelSocket,request -# Override the default port for the channelSocket -channelSocket.port=8009 -</source> - -If everything is ok move on to next section. -</p> -</section> - -<section name="Configuring Apache virtual hosting"> -<p> -rtfm at <a -href="http://httpd.apache.org/docs-2.0/vhosts/">http://httpd.apache.org/docs-2.0/vhosts/</a> -In the appendix you can find the httpd.conf file I used to write and test this -HOWTO. -</p> -</section> - -<section name="Configuring Apache to talk to Tomcat"> -<p> -Download the jk2 shared library for you version of apache and copy it in -/usr/local/apache/modules -(create the directory if necessary). If you can't find a suitable version of -jk2 ask it to the tomcat-user mailing list -or download the source and build it yourself (this is another HOWTO). -</p> -<p> -Create, if you haven't already, the /usr/local/apache/conf directory and create -a file named -workers2.properties with this content in it: - -<source> -# only at beginnin. In production uncomment it out -[logger.apache2] -level=DEBUG - -[shm] -file=/usr/local/apache/logs/shm.file -size=1048576 - -# Example socket channel, override port and host. -[channel.socket:localhost:8009] -port=8009 -host=127.0.0.1 - -# define the worker -[ajp13:localhost:8009] -channel=channel.socket:localhost:8009 - -# Uri mapping -[uri:10.0.0.10/*.jsp] -worker=ajp13:localhost:8009 - -[uri:www.home.net/*.jsp] -worker=ajp13:localhost:8009 - -[uri:www.customer1.it/*.jsp] -worker=ajp13:localhost:8009 - -[uri:www.customer2.net/*.jsp] -worker=ajp13:localhost:8009 -</source> - -Edit the file, change ip addresses and names to suit your needs and save it. -</p> -<p> -Edit http.conf and add the following line in the Modules section: - -<source> -LoadModule jk2_module modules/mod_jk2.so -</source> - -Save http.conf and try to start apache. It should now load the jk2 connector and -the configuration -from workers2.properties. -Check the error log to make sure everything is ok. -</p> -<p> -Start tomcat and try to load a HTML page in your browser: apache should return -the page -without problems. -Now try with a jsp page: it should display after a little. -<br/> -If you get errors check that the path and host names (double check also the -configuration of DNS -with your network administrator) are ok, the directories are readable by both -Tomcat and Apache. -Again look into the log files. -</p> -<p> -If everything works go to next section. -</p> -</section> - -<section name="The last trick"> -<p> -Now ask your network administrator to set up an alias for your brand new server -(use jspsrc if -you like to stick to this howto). -If you don't have easy access to dns try to edit your hosts file (on the client -where you open the browser) -and add a line as follows: - -<source> -10.0.0.10 jspsrc -</source> - -where 10.0.0.10 is the ip of your server. Open your browser and type this in -your location bar: - -<source> -http://jspsrc -</source> - -and navigate to a jsp page. You should get the source of the jsp page into your -browser! -</p> -<p> -This is clearly a security problem, if not a major annoyance. -</p> -<p> -What's wrong with the setup we came up so far? The problem is (or should be) -that the ajp13 -connector can't find a virtual host that matches the jspsrc uri. -What we need to do is set up the default virtual host so that ALL *.jsp requests -get handled by tomcat. -</p> -<p> -How do we do it? -</p> -<p> -Read on if you want to know how. -</p> -</section> - -<section name="JK directives in httpd.conf"> -<p> -In addition to the workers2.properties you can put Jk diretives directly into -the httpd.conf file (just as you did -with jk and webapp). -Edit the default virtual host section in httpd.conf and add the following lines -in the end, before -<code></VirtualHost></code>: - -<source> - <Location "/*.jsp"> - JkUriSet worker ajp13:localhost:8009 - </Location> -</source> - -Restart Apache and test the jspsrc url again. -</p> -<p> -The jsp source should not be displayed anymore. -</p> -</section> - -<section name="Notes"> -<p> -I think a better approach would be to remove all uri directives from -workers2.properties -and to put them in http.conf as we did in the previous section for the defualt -virtual host. -Experiment and let me know. -</p> -</section> - -<section name="APPENDIX A: httpd.conf"> -<p> -<source> -# -# Umberto Nicoletti, 18/10/2002 -# - -### Section 1: Global Environment - -ServerRoot "/usr/local/apache" -ErrorLog logs/error_log - -<IfModule !mpm_winnt.c> -<IfModule !mpm_netware.c> -#LockFile logs/accept.lock -</IfModule> -</IfModule> - -# ScoreBoardFile: File used to store internal server process information. -<IfModule !mpm_netware.c> -<IfModule !perchild.c> -#ScoreBoardFile logs/apache_runtime_status -</IfModule> -</IfModule> - -<IfModule !mpm_netware.c> -PidFile logs/httpd.pid -</IfModule> - -Timeout 300 - -KeepAlive On -MaxKeepAliveRequests 100 -KeepAliveTimeout 15 - -<IfModule prefork.c> -StartServers 5 -MinSpareServers 5 -MaxSpareServers 10 -MaxClients 150 -MaxRequestsPerChild 0 -</IfModule> - -<IfModule worker.c> -StartServers 2 -MaxClients 150 -MinSpareThreads 25 -MaxSpareThreads 75 -ThreadsPerChild 25 -MaxRequestsPerChild 0 -</IfModule> - -<IfModule perchild.c> -NumServers 5 -StartThreads 5 -MinSpareThreads 5 -MaxSpareThreads 10 -MaxThreadsPerChild 20 -MaxRequestsPerChild 0 -</IfModule> - -# listen on all ports -Listen 80 - -# -# Dynamic Shared Object (DSO) Support -# -LoadModule jk2_module modules/mod_jk2.so - -### Section 2: 'Main' server configuration - -<IfModule !mpm_winnt.c> -<IfModule !mpm_netware.c> -# -# If you wish httpd to run as a different user or group, you must run -# httpd as root initially and it will switch. -# -# User/Group: The name (or #number) of the user/group to run httpd as. -# . On SCO (ODT 3) use "User nouser" and "Group nogroup". -# . On HPUX you may not be able to use shared memory as nobody, and the -# suggested workaround is to create a user www and use that user. -# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET) -# when the value of (unsigned)Group is above 60000; -# don't use Group #-1 on these systems! -# -User nobody -Group #-1 -</IfModule> -</IfModule> - -ServerAdmin whate...@you.want -ServerName www.home.net -UseCanonicalName Off - -# -# The following directives define some format nicknames for use with -# a CustomLog directive (see below). -# -LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined -LogFormat "%h %l %u %t \"%r\" %>s %b" common -LogFormat "%{Referer}i -> %U" referer -LogFormat "%{User-agent}i" agent - -LogLevel debug -CustomLog logs/access.log common - -DocumentRoot "/opt/jakarta-tomcat-4.1.12-LE-jdk14/webapps/struts-example" - -<Directory /opt/jakarta-tomcat-4.1.12-LE-jdk14/webapps/struts-example> - Options None - AllowOverride None -</Directory> - -DirectoryIndex index.html index.jsp - -<Directory /> - Options None - AllowOverride None -</Directory> - -<Files ~ "^\.ht"> - Require all denied -</Files> - -<Location /WEB-INF/> - Order Allow,Deny -</Location> - -NameVirtualHost * - -<VirtualHost *> - ServerName www.home.net - ServerAlias www - ServerAlias localhost - ServerAdmin sysmas...@arpa.veneto.it - DocumentRoot /opt/jakarta-tomcat-4.1.12-LE-jdk14/webapps/struts-example - - ErrorLog logs/home.net-errorlog - CustomLog logs/home.net-access.log common - - <Location "/*.jsp"> - JkUriSet worker ajp13:localhost:8009 - </Location> -</VirtualHost> - -<VirtualHost *> - ServerName www.customer1.it - ServerAdmin sysmas...@arpa.veneto.it - DocumentRoot /opt/jakarta-tomcat-4.1.12-LE-jdk14/webapps/struts-blank - ErrorLog logs/cust1-errorlog -</VirtualHost> - -<VirtualHost *> - ServerName www.customer2.net - ServerAdmin sysmas...@arpa.veneto.it - DocumentRoot /opt/jakarta-tomcat-4.1.12-LE-jdk14/webapps/root - ErrorLog logs/cust2-errorlog -</VirtualHost> -</source> -</p> - -</section> -</document> diff --git a/xdocs/miscellaneous/changelog.xml b/xdocs/miscellaneous/changelog.xml index 33d556e..8310506 100644 --- a/xdocs/miscellaneous/changelog.xml +++ b/xdocs/miscellaneous/changelog.xml @@ -46,6 +46,11 @@ Remove support for the Netscape / Sun ONE / Oracle iPlanet Web Server as the product has been retired. (markt) </update> + <update> + Remove links to the old JK2 documentation. The JK2 documentation is still + available, it is just no longer linked from the current JK documentation. + (markt) + </update> <fix> <bug>64878</bug>: Common: Enable configure to find the correct sizes for pid_t and pthread_t when building on MacOS. (markt) diff --git a/xdocs/miscellaneous/faq.xml b/xdocs/miscellaneous/faq.xml index 85e074d..b6e55d2 100644 --- a/xdocs/miscellaneous/faq.xml +++ b/xdocs/miscellaneous/faq.xml @@ -58,7 +58,7 @@ to determine how to subscribe to tomcat mailing list. Now that JK moved to the <b>tomcat-connectors</b> repository, the source and the binaries for JK can be downloaded from a mirror at the <a href="http://tomcat.apache.org/download-connectors.cgi"> -Tomcat Connectors (mod_jk, mod_jk2) Downloads</a> page. +Tomcat Connectors (mod_jk) Downloads</a> page. </p> </subsection> @@ -302,7 +302,7 @@ configure assume you have some GNU tools already installed and configured for yo </p> <p> Also some systems may have mixed cc and gcc setup which may make you puzzled when trying to link an Apache built with native -c compiler with a jk/jk2 build with gcc. +c compiler with a jk build with gcc. </p> <p> In case the make processing doesn't work as expected, you should use a GNU make <b>gmake</b>. diff --git a/xdocs/miscellaneous/project.xml b/xdocs/miscellaneous/project.xml index 181243e..5217c80 100644 --- a/xdocs/miscellaneous/project.xml +++ b/xdocs/miscellaneous/project.xml @@ -62,7 +62,6 @@ <item name="Contribute documentation" href="../miscellaneous/doccontrib.html"/> <item name="JK Status Ant Tasks" href="../miscellaneous/jkstatustasks.html"/> <item name="Reporting Tools" href="../miscellaneous/reporttools.html"/> - <item name="Old JK/JK2 documentation" href="http://tomcat.apache.org/connectors-doc-archive/jk2/index.html"/> </menu> <menu name="News"> diff --git a/xdocs/news/project.xml b/xdocs/news/project.xml index ffdf531..092b870 100644 --- a/xdocs/news/project.xml +++ b/xdocs/news/project.xml @@ -62,7 +62,6 @@ <item name="Contribute documentation" href="../miscellaneous/doccontrib.html"/> <item name="JK Status Ant Tasks" href="../miscellaneous/jkstatustasks.html"/> <item name="Reporting Tools" href="../miscellaneous/reporttools.html"/> - <item name="Old JK/JK2 documentation" href="http://tomcat.apache.org/connectors-doc-archive/jk2/index.html"/> </menu> <menu name="News"> diff --git a/xdocs/project.xml b/xdocs/project.xml index 9acd5d7..f819773 100644 --- a/xdocs/project.xml +++ b/xdocs/project.xml @@ -62,7 +62,6 @@ <item name="Contribute documentation" href="miscellaneous/doccontrib.html"/> <item name="JK Status Ant Tasks" href="miscellaneous/jkstatustasks.html"/> <item name="Reporting Tools" href="miscellaneous/reporttools.html"/> - <item name="Old JK/JK2 documentation" href="http://tomcat.apache.org/connectors-doc-archive/jk2/index.html"/> </menu> <menu name="News"> diff --git a/xdocs/reference/project.xml b/xdocs/reference/project.xml index a876c2b..cb493a2 100644 --- a/xdocs/reference/project.xml +++ b/xdocs/reference/project.xml @@ -62,7 +62,6 @@ <item name="Contribute documentation" href="../miscellaneous/doccontrib.html"/> <item name="JK Status Ant Tasks" href="../miscellaneous/jkstatustasks.html"/> <item name="Reporting Tools" href="../miscellaneous/reporttools.html"/> - <item name="Old JK/JK2 documentation" href="http://tomcat.apache.org/connectors-doc-archive/jk2/index.html"/> </menu> <menu name="News"> diff --git a/xdocs/webserver_howto/project.xml b/xdocs/webserver_howto/project.xml index 59b62bf..0983bc0 100644 --- a/xdocs/webserver_howto/project.xml +++ b/xdocs/webserver_howto/project.xml @@ -62,7 +62,6 @@ <item name="Contribute documentation" href="../miscellaneous/doccontrib.html"/> <item name="JK Status Ant Tasks" href="../miscellaneous/jkstatustasks.html"/> <item name="Reporting Tools" href="../miscellaneous/reporttools.html"/> - <item name="Old JK/JK2 documentation" href="http://tomcat.apache.org/connectors-doc-archive/jk2/index.html"/> </menu> <menu name="News"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org