blob: 2f60d937c31772e94ab9739e287c2147acf89675 [file] [log] [blame]
<?xml version="1.0"?>
<!DOCTYPE document [
<!ENTITY project SYSTEM "project.xml">
]>
<document url="iis.html">
&project;
<properties>
<author email="mturk@apache.org">Mladen Turk</author>
<title>Configuring IIS</title>
</properties>
<body>
<section name="Requirements">
<p>
The Tomcat redirector requires three entities:
<ul>
<li>
<b>isapi_redirect.dll</b> - The IIS server plugin, either obtain a pre-built DLL or build it yourself (see the build section).
</li>
<li>
<b>workers.properties</b> - 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.
</li>
<li>
<b>uriworkermap.properties</b> - A file that maps URL-Path patterns to workers.
A sample uriworkermap.properties can be found under the conf directory as well.
</li>
</ul>
</p>
<p>
The installation includes the following parts:
<ul>
<li>
Configuring the ISAPI redirector with a default /examples context and checking that you can serve servlets with IIS.
</li>
<li>
Adding more contexts to the configuration.
</li>
</ul>
</p>
</section>
<section name="Registry settings">
<p>
ISAPI redirector reads configuration from the registry, create a new registry key named :
</p>
<p>
<b>"HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0"</b>
</p>
<attributes name="Key Name">
<attribute name="extension_uri" required="true"><p>
A string value pointing to the ISAPI extension <b>/jakarta/isapi_redirect.dll</b>
</p></attribute>
<attribute name="log_file" required="false"><p>
A value pointing to location where log file will be created.
(for example <b>c:\tomcat\logs\isapi.log</b>)
</p></attribute>
<attribute name="log_level" required="false"><p>
A string value for log level
(can be debug, info, warn, error or trace).
</p></attribute>
<attribute name="worker_file" required="true"><p>
A string value which is the full path to workers.properties file
(for example <b>c:\tomcat\conf\workers.properties</b>)
</p></attribute>
<attribute name="worker_mount_file" required="true"><p>
A string value which is the full path to uriworkermap.properties file
(for example <b>c:\tomcat\conf\uriworkermap.properties</b>)
</p></attribute>
<attribute name="rewrite_rule_file" required="false"><p>
A string value which is the full path to rewrite.properties file
(for example <b>c:\tomcat\conf\rewrite.properties</b>)
</p></attribute>
<attribute name="shm_size" required="false"><p>
A DWORD value size of the shared memory. Set this value to be
the number of all defined workers * 400.
(Set this value only if you have <b>more</b> then <b>64</b> workers)
</p>
<p>This directive has been added in version 1.2.20</p>
</attribute>
<attribute name="worker_mount_reload" required="false"><p>
A DWORD value specifying the time in seconds upon which the
<b>worker_mount_file</b> will be reloaded.
</p>
<p>This directive has been added in version 1.2.20</p>
</attribute>
<attribute name="strip_session" required="false"><p>
A string value representing a boolean. If it is set to true,
URL session suffixes of the form ";jsessionid=..." get stripped of URLs,
even if the are served locally by the web server.
A true value can be represented by the string "1" or any string starting
with the letters "T" or "t". A false value will be assumed for "0"
or any string starting with "F" or "f". The default value is false.
</p>
<p>This directive has been added in version 1.2.21</p>
</attribute>
</attributes>
</section>
<section name="Using a properties file for configuration">
<p>
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.
</p>
<p>
Create a properties file in the same directory as the ISAPI redirector called <b>isapi_redirect.properties</b> i.e. with the same name as the ISAPI redirector DLL but with a <em>.properties</em> extension. A sample isapi_redirect.properties can be found under the conf directory.
</p>
<p>
The property names and values in the properties file are the same as for the registry settings described above. For example:
</p>
<p>
<source>
# 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
</source>
</p>
<p>
Notes:
<ul>
<li>
Back-slashes - '\' - are not escape characters.
</li>
<li>
Comment lines begin with '#'.
</li>
</ul>
</p>
</section>
<section name="Using a simple rewrite rules">
<p>
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
</p>
<p>
The rule is in the form rewritten=real-url.
</p>
<p>
The rules must be simple strings. For example:
</p>
<p>
<source>
# Simple rewrite rules
/jsp/=/jsp-examples/
/servlets/=/servlets-examples/
</source>
</p>
<p>
Note that the uriworkermap or mount point must point to that new rule.
</p>
</section>
</body>
</document>