IIS Tomcat connector
From Geoikia-english
Introduction
In a basic configuration a client (e.g. webbrowser) communicates directly with a Tomcat instance:
However, if Tomcat is not directly accessible through the internet or your IIS Webserver uses Port 80, then it is necessary to have the IIS Webserver in between your client and TomCat instances. In those cases it is necessary to install the Apache Tomcat IIS Redirector. As a result the Web Server will act as a mediator between Tomcat and your web client. Note: additionally you may use the Redirector for load balancing.
Background information
Apache Tomcat IIS Redirector installation
- Log on your IIS Webserver as an Administrator
- Download isapi_redirect-[version].dll from the Tomcat Connectors download page to your local hard drive. (eg. C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector)
- Create a workers.properties file. (for example C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\conf\workers.properties). This file lists your TomCat instances (adapt to your environment). In the following example there are two TomCat instances named "TomCat1" (localhost, through port 8009) and "TomCat2" (IP=192.168.178.22, through port 8010). The type should be "ajp13":
worker.list=TomCat1,TomCat2
- worker.TomCat1.type=ajp13
- worker.TomCat1.host=localhost
- worker.TomCat1.port=8009
- worker.TomCat2.type=ajp13
- worker.TomCat2.host=192.168.178.22
- worker.TomCat2.port=8010
- Create a uriworkermap.properties file. (for example C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\conf\uriworkermap.properties). This file lists the applications (adapt to your environment). In the following example there are two applications "geoide-context1" and "geoide-context2".
/geoide-context1/*=TomCat1
- /geoide-context2/*=TomCat2
- Start the registry editor ([Start] [Run..] regedit):
- Create a new registry key named "HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0"
- Add a string value with the name extension_uri and a value of /jakarta/isapi_redirect-[version].dll
- Add a string value with the name log_file and a value pointing to where you want your log file to be (eg. C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\logs\isapi.log).
- Add a string value with the name log_level and a value for your log level (can be debug, info, error or emerg). N.B. Change it to 'error' when going into production!
- Add a string value with the name worker_file and a value which is the full path to your workers.properties file as created in step 3.
- Add a string value with the name worker_mount_file and a value which is the full path to your uriworkermap.properties file as created in step 4.
- Open the Internet Information Services Manager:
- Right-click on 'Default Web Site' and choose 'New' - > 'Virtual directory':
- Click 'Next'
- Input: jakarta
- Click 'Browse' and select the installation directory of isapi_redirect-[version].dll
- Click 'Next'
- Check 'Execute'
- Click 'Next'
- Click 'Finish'
- Open properties for 'Default Web Site'
- Go to tab 'ISAPI Filters'
- Click on 'add'
- Input:
- Filter name: jakarta
- Executable: [install location]/isapi_redirect-[version].dll
- Right-click on 'Web Service Extensions' and choose 'Add a new Web service extension'
- Extension name: Jakarta Tomcat
- Check Set extension status to Allowed'
- Click 'Add...':
- Browse to isapi_redirect-[version].dll
- Click 'OK'
- Right-click on 'Default Web Site' and choose 'New' - > 'Virtual directory':



