tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chong Yu Meng <chon...@cymulacrum.net>
Subject Re: Apache 2 + Tomcat 4.1.x + mod_jk2
Date Fri, 16 May 2003 11:34:54 GMT
Thanks, Mark !

I'm actually quite surprised that your jk2.properties file is so short ! 
And everything is so elegant, like the configuration for mod_jk! Your 
configuration I understand, unlike the one that came with my rpm file.

I kind of guessed that, if I wanted to know what options were available 
and how to configure them, I would have had to look through the source 
code. This is not a gripe ! If I had to choose between documenting my 
code and improving the functionality/stability/speed of my product, I 
would choose the latter any day. Hey, it's like the saying : those who 
can't do, teach. I'm just trying to write something that, hopefully, 
will be of use to someone else. My little contribution to the Tomcat and 
Linux communities.

I will try your suggestion and report back on it !

Thanks and Regards,
pascal chong



Mark Eggers wrote:

>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