Technical Recipes

How to use mod_jk connector on Windows

Assume that you have installed and configured the Tocmat application server instance 'data-example1' on your local Windows under $CATALINA_HOME directory under port 6612. This section discuss about how to configure Apache HTTPD server with mod_jk connector to connect to Tomcat instances.

1. Create a file if not exists
	under the /conf of Apache HTTPD server installation or instance

2. Add or Modify file

	2.1 Define 1 real worker using ajp13
	2.2 Set properties for worker1
	2.3 Create load balancing worker properties for failover (optional)
	worker.balance1.balance_workers=worker1, worker2
3. Modify httpd.conf after create a copy of the original httpd.conf
	# Mod_jk settings
	JkWorkersFile "conf/"
	JkLogFile "logs/mod_jk1.log"
	JkLogLevel info
	JkMount /example1/* worker1
	JkMount /example1/servlet/* worker1
	# Configuring Apache to serve static web application files
	Alias /manager C:/apache-tomcat-7.0.29/webapps/manager
	<Directory "C:/apache-tomcat-7.0.29/webapps/manager">
	    Options Indexes MultiViews 
	    AllowOverride None 
	    Order allow,deny 
	    Allow from all 
	JkMount /manager/* worker1
	JkUnMount /manager/images/*.gif worker1
	# End of mod_jk settings
	LoadModule  jk_module  modules/
4. Verify the connection is up
	(Re)start the web server and browse to the http://localhost/example1/