Florian,

>From my latest experience with my reconfiguration of Tomcat, Apache2 and mod_jk2 I 
>have somewhat figured things out. I think the bracketed items are a type:attribute 
>sort of like tags in XLM or HTML.

They are necessary to identify the individual pieces within the properties file. They 
are neccesary for when you have mulitple Web applications running on either one 
instance of tomcat or multiple instances of Tomcat.

I am including my newly revised workers2.properties file. As you can see I have 
defined 3 ports that tomcat will listen on, i.e.

[channel.socket:localhost:8###] these need to be unique. 

Then further down you can see where I have assigned the workers to the individual 
listen ports, i.e 

[uri:www.session1.com/*jsp]
worker=ajp13:localhost:8109

Now if you are only running one instance of Tomcat you only need one port and one 
worker. But in my case I have each web application running on a seperate instance of 
tomcat that I can turn on/off without affecting the other instances.

I hope that this helps clarify some thing for you.

Dean

BEGIN CODE

# only in the beginning. In production uncomment it out
[logger.apache2]
level=DEBUG

[shm]
file=z:/tomcat/logs/jk2.shm
size=1048576

# Example socket channel, override port and host.
[channel.socket:localhost:8109]
port=8109
host=127.0.0.1

[channel.socket:localhost:8110]
port=8110
host=127.0.0.1

[channel.socket:localhost:8111]
port=8111
host=127.0.0.1

#[channel.jni:jni]
#info=The jni channel, used if tomcat is started inprocess

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

#[vm:]
#info=Parameters used to load a JVM in the server process
#JVM=C:\jdk\jre\bin\hotspot\jvm.dll
#OPT=-Djava.class.path=Z:/Tomcat/bin/tomcat-jni.jar;Z:/Tomcat/server/lib/commons-logging.jar
#OPT=-Dtomcat.home=${TOMCAT_HOME}
#OPT=-Dcatalina.home=${TOMCAT_HOME}
#OPT=-Xmx128M
#OPT=-Djava.compiler=NONE
#disabled=0

#[worker1.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
#disabled=0
#stdout=Z:/tomcat/logs/stdout.log
#stderr=Z:/tomcat/logs/stderr.log

#[worker1.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
#disabled=0

# Define the worker
# First Web Application Worker
[ajp13:localhost:8109]
channel=channel.socket:localhost:8109

# Second Web Application Worker
[ajp13:localhost:8110]
channel=channel.socket:localhost:8110

# Third Web Application Worker
[ajp13:localhost:8111]
channel=channel.socket:localhost:8111

 Uri mapping
[uri:127.0.0.1/*.jsp]
worker=ajp13:localhost:8109

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

[uri:www.session1.com/*.jsp]
worker=ajp13:localhost:8109

[uri:www.session2.com/*.jsp]
worker=ajp13:localhost:8110

[uri:www.session3.com/*.jsp]
worker=ajp13:localhost:8111

END CODE


-----Original Message-----
From:   Florian Ebeling [mailto:[EMAIL PROTECTED]
Sent:   Fri 10/31/2003 05:40
To:     Tomcat Users List
Cc:     
Subject:        Re: jk or jk2
Dean-

thanks for sharing your material on your tested setup here. I wonder if 
you've got a distinct idea of how the syntax workers2.properties works. 
This is actually my single most pressing problem.

There is this section like thing: [foo:bar] What does it mean? Is it a

[type:instance]  -   eg. [uri:/context/*]

scheme, perhaps? This might make sense. Then this

[type:]          -   eg. [config:]

could be a "class" or singleton-like thing. And then, the properties. Do 
they always refer to the preceding square-bracketed item?

[type:obj]
property1=value1
property2=value2

What is the group syntax like? Is a group something I define with the 
[lb:some_lb_name] statement? Do I need a shared memory file under all 
circumstances, or is it neccessary only when I have several tomcats?

-Florian

Dean Searle wrote:

> The Oreilly book is only for Tomcat and Tomcat as a Standalone web/application 
> server. I have spent six months trying to figure out how everything works together 
> and how to get things implemented. Both from FreeBSD and Windows. I do have 
> documentation on how to get Apache2, Tomcat 4.1 and mod_jk2 to work together. Please 
> keep in mind that this is old documentation that I have out there, some things are 
> not optimized yet. 
> 
> I have just reconfigured my Apache2, Tomcat 4.1 and mod_jk2 installation. I 
> currently have a test environment where I am running two instances of Apache2 from 
> one binary install and three instances of Tomcat from one binary install. Each one 
> running different configuration from straight static site to jsp site and jsp with 
> SSL or Realm security with AD LDAP. But all using mod_jk2 when needed.
> 
> I will provide a link to my old documentation to get you started. I will try and 
> answer any other questions also. I am not an expert here though, just some things I 
> have figured out from reading numerous posts here and from other sites. I will 
> repost an updated documentation as soon as all my testing is done.
> 
> http://www.computingoasis.com/apache download the PDF please.
> 
> -Dean
> 
> 
> -----Original Message-----
> From: Florian Ebeling [mailto:[EMAIL PROTECTED]
> Sent: Thu 10/30/2003 09:42
> To:   Tomcat Users List
> Cc:   
> Subject:      Re: jk or jk2
> Hi Bernhard,
> 
>  > Here's a great book including mod_jk2:
>  > http://www.oreilly.de/catalog/tomcat/index.html
> 
> I got this book right next to my laptop, and I also like it quite much. 
> But I can't find it useful when it comes to using mod_jk2. It don't 
> really understand the contents of workers2.perperties. And they show 
> only an example of this file in their book.
> 
> To give you an example:
> [config:]
> File=/usr/local/apache2/config/workers2.properties
> debug=0
> debugEnv=0
> 
> I guess here they define some "config" instance. Ok. But where is the 
> point in giving the path to a config file *in exactly this config 
> file*?! No idea.
> 
> Or, another example:
> [uri:/examples]
> info=Examples ...
> context=/examples
> worker=ajp13:localhost:8009
> debug=0
> 
> This yields a deprecation warning in my apache2 error.log:
> [Thu Oct 30 13:13:48 2003] [notice] uriEnv.setAttribute() the worker 
> directive is deprecated. Use 'group' instead.
> 
> What is a group? I guess this could be a node group for load balancing 
> purposes. But I don't know. And the books won't say, neither the ORA nor 
> the Wrox one. I'm pretty stuck.
> 
> Sorry, I'm upset. Thanks for your hint, anyway.
> 
> -Florian
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to