Tomcat : Running Tomcat behind IIS
This page last changed on Jul 20, 2012 by Kees de Kooter
This configuration is tested on IIS versions lower than 7.
Installing isapi_redirect.dll
- put isapi_redirect-x.xx.dll in %CATALINA_HOME%\bin\win32\i386 and make a copy named isapi_redirect.dll (somehow dashes and dots are not allowed and symlinks are non existent in windows...).
- create isapi_redirect.properties in the same directory
- in IIS manager create a virtual directory pointing to this directory with read and execute permissions
- in IIS manager "Web Service Extensions" add the dll as an extension and set it to allowed
- on the site properties ISAPI filters tab add the dll
- restart the website. The filter should be up now.
isapi_redirect.properties
extension_uri=/isapi_redirect/isapi_redirect.dll
log_file=d:\log\${JKISAPI_NAME}.log
log_level=error
worker_file=${JKISAPI_PATH}\workers.properties
worker_mount_file=${JKISAPI_PATH}\uriworkermap.properties
uri_select=unparsed
Note that the environment variables are available in version 1.2.27.
worker_file
Usually called workers.properties
.
worker.list=node1
worker.node1.port=8009
worker.node1.host=localhost
worker.node1.type=ajp13
worker_mount_file
Determines which urls are served by which workers. Usually calles uriworkermap.properties
.
/<app-name>/*=node1
Logging
Starting the show
I noticed that just stopping and starting the website in the IIS manager does not have any effect. In order to load the connector you have to restart the IIS Admin Service in the Windows services applet.
Reference
http://tomcat.apache.org/connectors-doc/reference/iis.html. Note that the environment variable names in the example are wrong! They should be prefixed with "JK" and enclosed in braces.
Promising alternative for IIS 7 might BonCode: http://tomcatiis.riaforge.org/.