Links

- Docs Home

Configuration

- Workers.properties
- Apache
- IIS

# Tomcat Connector

## Configuring IIS

print-friendly
version

Requirements

> The Tomcat redirector requires three entities:

> - isapi_redirect.dll - The IIS server plugin, either obtain a pre-built DLL or build it yourself (see the build section).
> - workers.properties - A file that describes the host(s) and port(s) used by the workers (Tomcat processes). A sample workers.properties can be found under the conf directory.
> - uriworkermap.properties - A file that maps URL-Path patterns to workers. A sample uriworkermap.properties can be found under the conf directory as well.

> The installation includes the following parts:

> - Configuring the ISAPI redirector with a default /examples context and checking that you can serve servlets with IIS.
> - Adding more contexts to the configuration.

Registry settings

> ISAPI redirector reads configuration from the registry, create a new registry key named :

> "HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0"

> Key Name | Description
> --- | ---
> `extension_uri` | A string value pointing to the ISAPI extension /jakarta/isapi_redirect.dll
> `log_file` | A value pointing to location where log file will be created. (for example c:\tomcat\logs\isapi.log)
> `log_level` | A string value for log level (can be debug, info, warn, error or trace).
> `worker_file` | A string value with the full path to workers.properties file (for example c:\tomcat\conf\workers.properties)
> `worker_mount_file` | A string value with is the full path to uriworkermap.properties file (for example c:\tomcat\conf\uriworkermap.properties)
> `rewrite_rule_file` | A string value with is the full path to rewrite.properties file (for example c:\tomcat\conf\rewrite.properties)

Using a properties file for configuration

> The ISAPI redirector can read it's configuration from a properties file instead of the registry. This has the advantage that you can use multiple ISAPI redirectors with independant configurations on the same server. The redirector will check for the properties file during initialisation, and use it in preference to the registry if present.

> Create a properties file in the same directory as the ISAPI redirector called isapi_redirect.properties i.e. with the same name as the ISAPI redirector DLL but with a .properties extension. A sample isapi_redirect.properties can be found under the conf directory.

> The property names and values in the properties file are the same as for the registry settings described above. For example:

>     # Configuration file for the Jakarta ISAPI Redirector

>     # The path to the ISAPI Redirector Extension, relative to the website
>     # This must be in a virtual directory with execute privileges
>     extension_uri=/jakarta/isapi_redirect.dll

>     # Full path to the log file for the ISAPI Redirector
>     log_file=c:\tomcat\logs\isapi_redirect.log

>     # Log level (debug, info, warn, error or trace)
>     log_level=info

>     # Full path to the workers.properties file
>     worker_file=c:\tomcat\conf\workers.properties

>     # Full path to the uriworkermap.properties file
>     worker_mount_file=c:\tomcat\conf\uriworkermap.properties

> Notes:

> - Back-slashes - '\' - are not escape characters.
> - Comment lines begin with '#'.

Using a simple rewrite rules

> The ISAPI redirector with version 1.2.16 can do a simple URL rewriting. Althought not as powerfull as Apache Httpd's mod_rewrite, it allows a simple exchange of request uris

> The rule is in the form rewritten=real-url.

> The rules must be simple strings. For example:

>     # Simple rewrite rules

>     /jsp/=/jsp-examples/
>     /servlets/=/servlets-examples/

> Note that the uriworkermap or mount point must point to that new rule.

Copyright © 1999-2005, Apache Software Foundation