The Tomcat ISAPI Redirector (isapi_redirect.dll) connects a Microsoft IIS web server to a backend Apache Tomcat instance using the AJP protocol. This allows IIS to serve static content or act as the public-facing firewall while seamlessly routing Java applications (like servlets and JPs) to Tomcat.
This comprehensive guide covers the end-to-end setup process for modern Windows Server and IIS environments. Step 1: Prepare the Folder Structure and Files
To avoid administrative permission loops, place the redirector files in a dedicated directory outside of C:\Program Files.
Create a dedicated folder on your server, such as C:\Tomcat_Connector</code>.
Download the official isapi_redirect.dll binary from the Apache Tomcat Connectors Download Page. Save it inside your new folder.
Inside C:\Tomcat_Connector</code>, create three text files named exactly: isapi_redirect.properties workers.properties uriworkermap.properties
Create an empty subfolder for system troubleshooting logs: C:\Tomcat_Connector\logs</code>. Step 2: Configure the Properties Files
Populate the three created files with the configurations below. 1. isapi_redirect.properties
This file points the DLL to your configuration maps and logs.
extension_uri=/jakarta/isapi_redirect.dll log_file=C:\Tomcat_Connector\logs\isapi_redirect.log log_level=info worker_file=C:\Tomcat_Connector\workers.properties worker_mount_file=C:\Tomcat_Connector\uriworkermap.properties Use code with caution. 2. workers.properties
This defines the backend Tomcat server node (worker) running the AJP protocol.
# Define the list of workers worker.list=tomcatworker # Map settings to the worker worker.tomcatworker.type=ajp13 worker.tomcatworker.host=localhost worker.tomcatworker.port=8009 Use code with caution.
(Note: If you have modified the secret or secretRequired parameters inside Tomcat’s server.xml AJP connector, you must mirror those exact string parameters here.) 3. uriworkermap.properties
This dictates which specific URL string rules get pushed out to Tomcat.
# Route all traffic for a specific context path /your-app/=tomcatworker /your-app=tomcatworker # Alternatively, route all JSP requests globally # /.jsp=tomcatworker Use code with caution. Step 3: Configure Microsoft IIS Manager
Open the IIS Manager (inetmgr) from the Windows Start menu to map the configurations. 1. Grant Server-Wide ISAPI Privileges
IIS and isapi_redirect AJP13 connector - tomcat - Server Fault
Leave a Reply