On Mon, 10 Jun 2002, Douglas, Rory wrote:
> It seems the config format for httpd.conf has changed: Apache now complains
> about JkWorkersFile etc. A little searching unearthed people using JkSet
> .... and including a lot of stuff that used to be in workers.properties
> directly in httpd.conf.
There are 2 categories of info:
1. Global settings ( channels, workers, etc)
2. Mappings
Each can be configured in either workers2.properties or httpd.conf.
All things follow a simple pattern: you have a named component, a property
and a value.
In workers2.properties:
[COMPONENT]
property=value
or
COMPONENT.property=value
( the first format seems more clean and easier to type/read )
In httpd.conf:
JkSet COMPONENT.property value
For the second part, what used to be "JkMount /foo/* ajp13":
In workers2.properties:
[uri:/foo/*]
group=ajp13
In Apache2 httpd.conf:
<Location /foo/*>
JkUriSet group ajp13
</Location>
We use 'group' because the recommened method is to map to an lb group,
even if you have a single instance. Each ajp13 worker you define is
automatically part of the default worker ( named 'lb'), or you can
specify different groups ( if you have complex setups ).
The first choice ( workers2.properties ) will work unchanged with
any server supported by jk2. The second is only implemented for Apache2,
but is faster and scales better ( it uses the highly optimized apache2
mapper instead of our less optimized mapper in jk ).
Also the first choice supports some runtime reconfigurations without
restarting apache ( like enabling/disabling/adding workers or
mappings ). It is a very fine line here, we want to avoid restarting
for frequent changes that happen in tomcat ( adding more workers to
handle high load, container restarts, etc ), but dynamic reconfig
has a price in syncs and performance so we keep it small for now.
> Is this the way to configure mod_jk2? If so, where are the directives
> documented?
Not yet, there is a sample workers2.properties. We're waiting for
contributions :-)
( I'll write more when I find some time, but it would be great if
someone who can actually write will do it )
> I have attempted to use some fragments I found on a tomcat-dev mailing list
> archive eg.
>
> JkSet worker.ajp13.type ajp13
> JkSet worker.ajp13.channel socket
> JkSet worker.ajp13.port 8009
>
> However, Apache complains with "unrecognised option worker.ajp13.type
> ajp13" etc.
That's an old message, before reorganizing the load balancer and channels.
'worker' has been replaced with 'channel' in the configs ( since ajp13
is the worker in most cases, and there's little to configure in it ).
Try:
JkSet channel.socket:localhost:8009.group lb
Note that the name of the channel and worker should be URL-style
( it is possible to avoid that, but I think it's cleaner ).
This setting will create a worker named:
ajp13:localhost:8009
and you can map to it using
JkUriSet group ajp13:localhost:8009
Or better:
JkUriSet group lb
( in a <Location> )
Costin
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>