[FrontPage] [TitleIndex] [WordIndex

Using Tomcat with IIS

A HowTo for integrating Apache Tomcat with Microsoft IIS

1. General Information

The task at hand is to convince IIS to receive HTTP requests, pass them on to Tomcat and reply accordingly to the client.

Generally the steps to do are:

  1. Installation of IIS redirector
  2. Configuration of Tomcat properties files (workers.properties and uriworkermap.properties in $TOMCAT_HOME$/conf)
  3. Configuration of Windows Registry (set some registry values)
  4. Configuration of IIS (Some work with the IIS management console)

2. Installation of IIS redirector

This is simple. Download isapi_redirect installer from http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.15/isapi_redirect.msi and install it to $TOMCAT_HOME$/.. (same directory level as 'Tomcat 5.5', e.g. D:\Programme\Apache Software Foundation\Jakarta Isapi Redirector). This directory will from now on be called $ISAPI_REDIRECTOR_HOME$

The directory structure should look like in the following:

dir-structure.png

3. Configuration of tomcat properties files

In $ISAPI_REDIRECTOR_HOME$/conf two files have to be adjusted:worker.properties.minimal and uriworkermap.properties.

workers.properties.minimal (only adjust if you use non-standard ports for Tomcat

worker.list=wlb,jkstatus
# Defining a worker named ajp13w and of type ajp13
# Note that the name and the type do not have to match.
# Port number has to be set right (to port where AJP/13 connector is defined in server.xml)
worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009
# Defining a load balancer
worker.wlb.type=lb
worker.wlb.balance_workers=ajp13w
# Define status worker
worker.jkstatus.type=status

uriworkermap.properties

/igeoportal/*=wlb
#
# Mount jkstatus to /jkmanager
# For production servers you will need to
# secure the access to the /jkmanager url
#
/jkmanager=jkstatus

To test the (not yet at - there is still some work to do) configuration, IIS and Tomcat have to run. Only the directories / servlets that are set up in Tomcat's server.xml and the uriworkermap.properties can be requested.

4. Configuration of Windows Registry

(this step is possibly already done by the ISAPI Redirector installer)

Now some registry values have to be set (using "regedit"):

[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation]
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector]
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0]
"extension_uri"="/jakarta/isapi_redirect.dll"
"log_file"="D:\\Programme\Tomcat 5.5\\logs\\isapi.log"
"log_level"="error"
"worker_file"="D:\\Programme\Tomcat 5.5\\conf\\workers.properties.minimal"
"worker_mount_file"="D:\\Programme\Tomcat 5.5\\conf\\uriworkermap.properties"

Here is a screenshot depicting these: registry-entries.PNG

5. Configuration of IIS

iis-manager1.png

iis-manager3.PNG

iis-manager2.PNG

Now you should test if the integration works. :)

For the changes to take effect it is necessary to restart Tomcat (the usual way) and IIS. To be sure IIS is properly stopped and restarted use the following commands:

net stop iisadmin /yes
net start w3svc

6. Using IIS authentication

In case you want to also use authentication with IIS and tomcat, you have to follow the following steps. On IIS side you have to

authentication.PNG

On tomcat side it is necessary to set the tomcatAuthentication parameter (in $ISAPI_REDIRECTOR_HOME$\conf\server.xml) for the AJP/1.3 connector to false like shown below:

<Connector port="8009" tomcatAuthentication="false" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />

7. Additional Information

Some additional information can be found at: Tomcat Doc (comprehensive but a bit complicated) Tomcat with IIS (also helpful, but not really complete).

A good description for integration IIS with Tomcat is given at (although the description refers to Tomcat 5.0.xx): http://support.esri.com/index.cfm?fa=knowledgebase.techArticles.articleShow&d=29051

The file http://downloads.esri.com/support/TechArticles/IMS/tomcat_5028_Windows/Tomcat5028_IIS_IMS91_win.zip that is referenced in this page is very helpful.


CategoryDeegree2


2018-04-20 12:04