| <?xml version="1.0"?> |
| <document> |
| <copyright> |
| Copyright 1999-2004 The Apache Software Foundation |
| |
| Licensed 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="cmanolache@yahoo.com">Costin Manolache</author> |
| <author email="jfrederic.clere@fujitsu-siemens.com">Jean-Frederic Clere</author> |
| <date>$Date$</date> |
| </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> |