Skip to Content

Using IIS to redirect to Tomcat

Having some experience with Tomcat’s isapi_redirect plugin for IIS, I recently found a new way to enable redirection to Tomcat from IIS7.0+ using Application Request Routing (ARR) module.

This new method is does not require multiple configuration files (uriworkermap.properties, workers.properties, regkeys), IIS configurations and DLL files.

Excerpt from Microsoft:

“Microsoft Application Request Routing (ARR) for IIS 7 and above is a proxy-based routing module that forwards HTTP requests to content servers based on HTTP headers, server variables, and load balance algorithms. ARR relies on the URL rewrite module to inspect incoming HTTP requests to make the routing decisions. Therefore, the URL rewrite module is required to enable ARR features.”


There are several features of this module which you can read about here:
Using the Application Request Routing Module : The Official Microsoft IIS Site

Read on to learn how to configure ARR in a simple environment:

Configuring ARR to redirect to Tomcat

These steps assume that you’ve already installed XI3.1 or BI4.x which already includes an installation of Tomcat and the appropriate BI web applications and that you already have IIS7.0+ installed and running.  I also make reference to Localhost, but you can replace this with your hostname

  1. Download and install the ARR extension from Microsoft:
    Application Request Routing : The Official Microsoft IIS Site

  2. Launch IIS Manager:
    /wp-content/uploads/2014/11/1_578930.png
  3. Open “Application Request Routing Cache”:
    /wp-content/uploads/2014/11/2_578931.png
  4. Once opened, on the far right column, select “Server Proxy Settings”:
    /wp-content/uploads/2014/11/3_578932.png
  5. In The Application Request Routing Screen, Check the box “Enable Proxy” and click Apply.  Leave all the default settings.
    /wp-content/uploads/2014/11/4_578933.png

  6. Next Open the “URL Rewrite” dialog:
    /wp-content/uploads/2014/11/5_578934.png
  7. Once open, select “Add Rule” on the far right and choose a BLANK rule to start with, select OK.
    Use the following configuration to redirect all requests to Tomcat on the localhost:

    Name: Tomcat
    Pattern: .*
    Rewrite URL: http://localhost:8080/{R:0}

    Select Apply
    /wp-content/uploads/2014/11/6_578943.png

  8. Test:

    http://localhost

    /wp-content/uploads/2014/11/7_578948.png

Summary:

For me and my installations with IIS to Tomcat redirect, this configuration has simplified the previously cumbersome install of the mod_jk isapi filter for IIS.  In addition, the ARR module does not require any additional configuration on the Tomcat side, (including opening the 8009 AJP13 redirect port).

The configuration for ARR can be extended to support a multitude of load balancing configurations and can be configured to redirect to any number of Web Application servers (not just Tomcat!)

For more information:

See the related articles section on this page:

http://www.iis.net/downloads/microsoft/application-request-routing

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply