tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rueedi Christian" <c.rue...@bluemail.ch>
Subject Re: Apache 2 + Tomcat 4.1.x + mod_jk2
Date Fri, 16 May 2003 06:39:00 GMT
Hi There!

My config looks like this:

#
# jk2.properties socket configuration
#
handler.list=request,container,channelSocket

#
# socket configuration
#
channelSocket.port=8009
channelSocket.address=127.0.0.1
channelSocket.maxPort=port+10

#
# workers2.properties socket configuration
#

[shm]
file=C:/Apache2/logs/shm.file
size=1048576

[workerEnv:]
info=Global server options
timing=1
debug=0

# Example socket channel, override port and host.
[channel.socket:worker_John] 
port=8009
host=127.0.0.1

# define the worker
[ajp13:worker_John] <<--- to use my own name, but HAS TO BE THE SAME NAME
AS CHANNEL!!!! (I lost nearly a day to figure this out ;-)
channel=channel.socket:worker_John <<--- referencing to the channel

# define the worker
[status:status]


httpd.conf:

<LocationMatch /examples/*.jsp>
   Options Indexes FollowSymlinks MultiViews
   AllowOverride None
   Order allow,deny
   Allow from all
   JkUriSet worker ajp13:worker_John
</LocationMatch>


greetz,

 Chris



>-- Original-Nachricht --
>Reply-To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
>To: tomcat-user@jakarta.apache.org
>From: Mark Eggers <mdeggers@earthlink.net>
>Subject: Re: Apache 2 + Tomcat 4.1.x + mod_jk2
>Date: Thu, 15 May 2003 20:48:28 +0000 (UTC)
>
>
>Pascal,
>
>There are several ways of using mod_jk2 to connect Apache 2.0.x and 
>Tomcat 4.1.x.
>
>Probably the simplest way is to use the sockets connection.  The 
>configuration files are very short.
>
>#
># jk2.properties socket configuration
>#
>handler.list=request,container,channelSocket
>
>#
># socket configuration
>#
>channelSocket.port=8009
>channelSocket.address=127.0.0.1
>channelSocket.maxPort=port+10
>
>#
># workers2.properties socket configuration
>#
>
>[shm]
>file=C:/Apache2/logs/shm.file
>size=1048576
>
>[workerEnv:]
>info=Global server options
>timing=1
>debug=0
>
># 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
>
># define the worker
>[status:status]
>
># Uri mapping
>[uri:/jkstatus/*]
>worker=status:status
>
># Uri mapping
>[uri:/examples/*.jsp]
>worker=ajp13:localhost:8009
>
># [uri:/examples/servlet/*]
>worker=ajp13:localhost:8009
>
>Please note that with these partial matches, you will have to define 
>Alias <uri> <absolute-path> in your httpd.conf to catch any non-jsp and

>non-servlet information.
>
>As John as mentioned, you can do a lot of the workers2.properties file 
>configuration in httpd.conf.  According to the information in the source
>
>code, using JkUriSet is supposed to be more scalable for large sites.  
>Apache looks up URI info from httpd.conf via a  hash mechanism, but 
>searches linearly through the workers2.properties file.
>
>Using the JkUriSet directive in httpd.conf, you would delete the two uri
>
>mappings for the examples and add something like the following:
>
><LocationMatch /examples/*.jsp>
>   Options Indexes FollowSymlinks MultiViews
>   AllowOverride None
>   Order allow,deny
>   Allow from all
>   JkUriSet worker ajp13:localhost:8009
></LocationMatch>
>
><LocationMatch /examples/servlet/*>
>   Options Indexes FollowSymlinks MultiViews
>   AllowOverride None
>   Order allow,deny
>   Allow from all
>   JkUriSet worker ajp13:localhost:8009
></LocationMatch>
>
>You would still need an Alias directive to catch html and images from the
>
>examples area.
>
>The above notes are for running Apache and Tomcat as separate processes,
>
>and starting each program separately.
>
>I've run both configurations (with and without JkUriSet) on both 
>Windows/2000 and Redhat Linux 9 with no problems in a development 
>environment.
>
>HTH
>
>/mde/
>just my two cents . . . .
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message