SH Solutions wrote:

Hi

Now I am stuck with configuration.
The online documentation really isnt useful. Sorry. This differs from
tomcat. Anyway, I stored a lot of bookmarks in the last weeks about JK2 from
this list.

The docs are really awful.


But there are a lot of questions open.
Some tutorials talk about default workers2.properties files. I dont know
where to find this. A lot of tutorials about jk2 give different syntax for
the configuration files. NO tutorial even states where the files must be
placed. Can anyone tell me, how tomcat should know where to find these
files? Or apache2?

There are two files to muck with:


FILE 1: ${CATALINA_HOME}/conf/jk2.conf
--------------------------------------

#
# Environment
#
jkHome=Apache_JK2-2.0.2
jkUSR=/usr/opt/${jkHome}
jkVAR=/var/opt/${jkHome}

# Set the desired handler list
# handler.list=apr,request,channelJni
# handler.list=apr,request,channelSocket
handler.list=apr,request,channelUnix

#
# APR
#
apr.NativeSo=${jkUSR}/module/jkjni.so
# apr.jniModeSo=inprocess
apr.baseDir=${jkVAR}
apr.aprHome=/usr/opt/Apache-2.0.48-W
apr.soExt=so

#
# TCP/IP Socket Channel
#
channelSocket.port=8009
channelSocket.address=127.0.0.1
channelSocket.maxPort=port+10
channelSocket.maxThreads=50
# channelSocket.backLog=
# channelSocket.tcpNoDelay=
# channelSocket.soTimeout=
# channelSocket.soLinger=
# channelSocket.serverTimeout=

#
# UNIX file socket channel
#
channelUnix.file=${jkVAR}/channels/jk2.sock

#
# JNI inprocess channel
#

#
# JMX handler
#
mx4j.port=-1
#
# Shared Memory handler
#
shm.file=${jkVAR}/channels/jk2.shm
shm.host=localhost
shm.port=8009
shm.unixSocket=${jkVAR}/channels/jk2.sock

#
# Request handler
#
request.tomcatAuthentication=true
# request.ajpidDir=
# request.decodedUri=
# request.secret=
# request.useSecret=

FILE 2: ${APACHE_ROOT}/conf/workers2.properties
-----------------------------------------------
#
# Logger level can be EMERG, ERROR, INFO, DEBUG
#
[logger]
level=INFO

[logger.file:0]
level=INFO
file=/var/opt/Apache_JK2-2.0.2/logs/mod_jk2.log

[config:]
file=${serverRoot}/conf/workers2.properties
debug=0
debugEnv=0

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

# [shm:]
info=Scoreboard. Required for reconfiguration and status with multiproc srv
file=/var/opt/Apache_JK2-2.0.2/channels/jk2.shm
size=1000000
debug=0
disabled=0

[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

#==========================================================#
#                                                          #
# CHANNELS (physical means of sending to Tomcat instances) #
#                                                          #
#==========================================================#

# [channel.socket:localhost:8009]
# info=Ajp13 forwarding over socket
# debug=0
# tomcatId=localhost:8009

# [channel.socket:localhost:8809]
# info=Ajp13 forwarding over socket to JBoss/Jetty
# debug=0
# tomcatId=localhost:8809

# [channel.socket:localhost:8019]
# info=A second tomcat instance.
# debug=0
# tomcatId=localhost:8019
# lb_factor=1
# group=lb
# group=lb_1
# disabled=0

[channel.un:unixsock]
info=A second channel connecting to localhost:8019 via unix socket
file=/var/opt/Jk2-2.0.2/channels/jk2.sock
lb_factor=1
debug=0

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

#===============================================#
#                                               #
# Workers (these accept requests from URI maps) #
#                                               #
#===============================================#

# [lb:lb]
# info=Default load balancer.
# debug=0
# worker=
# noErrorHeader=1
# noWorkerMsg=
# noWorkerCode=503
# hwBalanceErr=
# timeout=0
# attempts=3
# recovery=60
# stickySession=1

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

[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=${TOMCAT_HOME}/lib/tomcat-jni.jar;${TOMCAT_HOME}/server/lib/commons-logging.jar
# OPT=-Dtomcat.home=${TOMCAT_HOME}
# OPT=-Dcatalina.home=${TOMCAT_HOME}
# OPT=-Xmx128M
# # OPT=-Djava.compiler=NONE
# disabled=1


# [worker.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=1
# stdout=/var/log/httpd/jk2-stdout.log
# stderr=/var/log/httpd/jk2-stderr.log

# [worker.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=1

# [ajp13:unixsock]
info=Default AJP 1.3 worker
channel=channel.un:unixsock
# secretkey=
# tomcatId=
# route=
# group=
# level=
# max_connections=0
# connectTimeout=0
# replyTimeout=0
# prepostTimeout=0

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

# [uri:127.0.0.1:8003]
# info=Example virtual host. Make sure myVirtualHost is in /etc/hosts to test it
# alias=myVirtualHost:8003

# [uri:127.0.0.1:8003/ex]
# info=Example webapp in the virt host. It'll go to lb_1 (i.e. localhost:8019)
# context=/ex
# group=lb_1

# [uri:/examples]
# info=Example webapp in the default context.
# context=/examples
# debug=0

# [uri:/examples1/*]
# info=A second webapp, this time going to the second tomcat only.
# group=lb_1
# debug=0
# [uri:/examples/servlet/*]
# info=Prefix mapping

# [uri:/examples/*.jsp]
# info=Extension mapping

# [uri:/examples/*]
# info=Map the whole webapp

# [uri:/examples/servlet/HelloW]
# info=Example with debug enabled.
# debug=10

# [uri:/jmx-console/*]
# info=JBoss JMX console
# worker=ajp13:localhost:8809

[uri:www.my-vhost.com/my_path]
info=Consumer's electrical bill
group=ajp13:unixsock
context=/tomcats_path

Nix.


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



Reply via email to