tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From inamin...@pobox.com
Subject Re: Tomcat + jk2 connector configuration
Date Fri, 07 Nov 2003 09:22:04 GMT
Quoting Tatu Vanhanen <tatu.vanhanen@graftor.fi>:

Hi,
a quick and dirty answer. I am only running this for a day ... so with this in
mind here are my comments:

1. I have noticed that I often made errors using JK instead of JK2 syntax, file
names, docs in general. For instance the way your declare your users (channel,
worker, ...) makes me think of my previous configuration tests ;)

2. To achieve what you want I use the lb (load balancer) and group elements but
do not guarantee its the best way ...

3. The [uri:/jkstatus/*] group=status: is very nice to use since it allow you to
"hot" configurations change provided you use the {ver= } attribute (not version
like stated in the doc !) to notify the status change.

I added some of my config diff hereafter.


> Hello,
> We have a development environment where each developer has a separate
> Tomcat
> instance to play with. Each Tomcat should listen in it's port for requests
> coming from the Apache front-end. The mappings for each user's Tomcat
> should
> be based on the request uri, i.e. http://www.somehost.com/user1/xxxx means
> that Apache should forward the requests having 'user1' to user1's running
> Tomcat instance.
> 
> We have this working with the "ancient" Warp- connector but we should move
> to jk2 because of some issues with warp.
> 
> Could someone please include some example of
> workers2.properties/jk2.properties that would give us some hint of how to
> make things work. Yes, we have tried to configure things but apparently
> something has been missing and we are still stuck with warp :(
> 
> Below is our workers2.properties (with user names replaced with more
> "publishable" names). Is there something missing there?
> 
> Thanks a lot!
> 
> workers2.properties:
> 
> 
> [logger.apache2]
> level=DEBUG

# ? Defining ourselves ? For jkstatus ?
[config:]
file=/usr/local/apache2/conf/workers2.properties
debug=0
debugEnv=0

[uriMap:]
info=Maps the requests. Options: debug
debug=0

# Alternate file logger
#[logger.file:0]
#level=DEBUG
#file=${serverRoot}/logs/jk2.log


> [shm]
> file=/www/logs/shm.file
> size=1048576
> 

[workerEnv:]
info=Global server options
timing=1
debug=0
# Default Native Logger (apache2 or win32 ) 
# can be overriden to a file logger, useful 
# when tracing win32 related issues
#logger=logger.file:0

[lb:lb]
info=Default load balancer.
debug=0

[lb:lb_1]
info=A second load balancer.
debug=0

[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket to local host
debug=0
tomcatId=localhost:8009
lb_factor=1
group=lb
disabled=0
ver=3

[channel.socket:192.168.1.12:8009]
info=Ajp13 forwarding over socket to second tomcat instance on 192.168.1.12 host
debug=0
tomcatId=192.168.1.12:8009
lb_factor=1
group=lb_1
disabled=0
ver=1

[status:]
info=Status worker, displays runtime informations


[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:


[uri:mill.789.ch/*]
info=mill virtual host
context=/adhoc-crm
group=lb
debug=0

[uri:sandbox.789.ch/*]
info=sandbox virtual host
context=/adhoc-crm
group=lb_1
#group=lb
debug=0

> # First Tomcat serving a product under tests
> 
> [channel.socket:localhost:9025]
> port=9025
> maxPort=9025
> host=127.0.0.1
> 
> [ajp13:localhost:9025]
> channel=channel.socket:localhost:9025
> 
> [uri:/product1/*]
> worker1=ajp13:localhost:9025
> 
> 
> # user1
> 
> [channel.socket:localhost:9031]
> port=9031
> maxPort=9031
> host=127.0.0.1
> 
> [ajp13:localhost:9031]
> channel=channel.socket:localhost:9031
> 
> [uri:/user1/*]
> worker1=ajp13:localhost:9031
> 
> 
> # user2
> 
> [channel.socket:localhost:9029]
> port=9029
> maxPort=9029
> host=127.0.0.1
> 
> [ajp13:localhost:9029]
> channel=channel.socket:localhost:9029
> 
> [uri:/user2/*]
> worker1=ajp13:localhost:9029
> 
> # user3
> 
> [channel.socket:localhost:9027]
> port=9027
> maxPort=9027
> host=127.0.0.1
> 
> [ajp13:localhost:9027]
> channel=channel.socket:localhost:9027
> 
> [uri:/user3/*]
> worker1=ajp13:localhost:9027
> 
> # user4
> 
> [channel.socket:localhost:9021]
> port=9021
> maxPort=9021
> host=127.0.0.1
> 
> [ajp13:localhost:9021]
> channel=channel.socket:localhost:9021
> 
> [uri:/user4/*]
> worker1=ajp13:localhost:9021
> 
> 
> ---------------------------------------------------------------------
> 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