# Comments will be lost when protocol-based config will be used # ( at least in the first version ). In a future version we'll save # the comments before every section and property and save ( maybe ) # Global options ( in addition to the pre-defined fs, ps, java_home [config] ## TOMCAT_HOME, CATALINA_HOME, JAVA_HOME and LD_LIBRARY_PATH # must be set for the jni worker to operate. debugEnv=0 # Logger options. For apache2 only level can be set ( it logs to apache's error.log ) [logger] level=DEBUG # File property is not used on Apache2 or if a 'native' logger is available # The Apache2 ( or native ) log file is used instead # For apache1 the file must be specified if you want logging. # file=logs/mod_jk.log [shm] file=${serverRoot}/logs/jk2.shm size=1000000 [uriMap] debug=0 [workerEnv] debug=0 #################### Channels #################### # Each channel defines a communication mechanism to a tomcat instance. # Each channel is associated with a ajp13:NAME, with the same local name # Default channel #[channel.socket:localhost:8009] #lb_factor=1 #tomcatId=localhost:8009 # Example additional socket channel. The location is in the name ( URL-style [channel.socket:localhost:8019] tomcatId=localhost:8019 lb_factor=1 group=lb_1 group=lb # Example unix socket. # XXX We must use an explicit setting to use substitution - resolve this [channel.apr:${TOMCAT_HOME}/work/jk2.socket] tomcatId=localhost:8009 lb_factor=0 # # The JNI channel is enabled and configured automatically # if a VM is detected and tomcat started. [channel.jni:jni] #################### Workers #################### # All non-ajp13 workers or workers with special configurations # There is no configuration for ajp13 workers - you just configure # channels # The status worker. [worker.status] # Requirements: libjvm.so MUST BE INCLUDED in LD_LIBRARY_PATH for this # to work reliably and on all platforms. Same for other java libs. # "java" script is a good example, Sun needs it to start java and we need it to. # JAVA_HOME and TOMCAT_HOME can be set as environment variables [vm] # That will work with both 3.x and 4.x. OPT=-Djava.class.path=${TOMCAT_HOME}/bin/tomcat-jni.jar OPT=-Dtomcat.home=${TOMCAT_HOME} OPT=-Dcatalina.home=${TOMCAT_HOME} OPT=-Xmx128M #OPT=-Djava.compiler=NONE [worker.jni:jniCmd1] ARG=start #################### Locations #################### # XXX Uris to be read from separate file, one per webapp. # XXX Webapps to be declared automatically, using webapps/ content :-) ### Virtual host definitions ( in the vhost directory ) # No '/' in the name. # It _must_ be defined for each virtual host ( or bad things will happen in jk2.0, # later we might forgive you ) ( either manually or automatically ) [uri:localhost:8080] alias=127.0.0.1:8080 alias=myLocalHost:8080 ### Webapps definitions ( in each webapp ) # The name and context are equals ( that's how we know it's a context definition ) # Must be defined [uri:/examples] context=/examples [uri:/examples1] context=/examples group=lb_1 [uri:localhost:8080/examples] context=/examples # Status worker. XXX protect it with and security settings, # it'll display all properties - including eventual secrets. # [uri:/jkstatus/*] group=worker.status: ### Per/uri mappings # Exact mapping [uri:/examples/servlet/RequestHeaderExample] # Prefix mapping [uri:/examples/servlet/RequestInfoExample/*] [uri:/examples/*] [uri:/examples1/*] # XXX The setting should be only on host and context group=lb_1 # Extension match [uri:/examples/*.jsp] ## No other forms of mappings are currently supported # Because the spec doesn't support them.