Proxying RMsis server with Jira using Microsoft Internet Information Services (IIS)

Overview

RMsis can be configured to run using IIS in reverse proxy Configuration. Configuring a reverse proxy server allows for running RMsis on non-standard HTTP/HTTPS port (such as 3060) and users will be able to access RMsis over standard HTTP/HTTPS as their traffic will be routed through the proxy.

This page describes how to integrate IIS Server with RMsis, utilizing URL Rewrite so that IIS operates as a reverse proxy over HTTP/HTTPS. 

Target Audience :

The target audience for this document are users who want to

  • access RMsis over HTTPS but do not want to install/ configure a security certificate. 
  • run RMsis behind a reverse proxy server using IIS.  

Prerequisites :

The following are the prerequisites for running RMsis behind a reverse proxy server :

A typical Reverse Proxy Configuration

If the above-mentioned prerequisites are fulfilled, a typical reverse Proxy Configuration with JIRA and RMsis running on HTTP will look like this: 

                                Figure 1 :  A typical Reverse Proxy Configuration

In the above image, the reverse proxy server is configured for the URL https://jira.example.com , the JIRA server is configured for URL 10.1.1.1 

Link #1: Client machine accessing reverse proxy server - https://jira.example.com

Link #2: Reverse Proxy Server accessing JIRA Server : http://10.1.1.1:8080/

Now, We need to configure links #3, and #5 (Link #4 is automatically created by RMsis).

Add URL Rewrite Rule for RMsis Server

  1. Open IIS Manager and find the site being used for Jira. For example: jira.example.com in the above image.
  2. From the IIS Console, click on  jira.example.com  and open URL Rewrite
  3. From the Actions panel on the right-hand side, select "Add Rules" and choose "Blank Rule";
  4. Add a name for the rule;
  5. Set Match URL to:
    1. Requested URLMatches the Pattern
    2. UsingRegular Expressions
    3. Pattern^rm/(.*)
    4. Ignore CaseChecked
  6. Set Action to:
    1. Action TypeRewrite
    2. Rewrite URL http://<RMsis_url:Port>/{R:0}
    3. Append query stringChecked
  7. Mark Stop processing of subsequent rules
  8. Click on Apply to apply the changes.

Sample Reverse Proxy Configuration for IIS:

If JIRA is running under the root context "/jira",then the URL Rewrite rules for both JIRA and RMsis servers would be:



Note : The reverse proxy URL Rewrite rule for RMsis should be written before the URL Rewrite directives for JIRA in the IIS configuration. It will be listed below the Jira URL Rewrite rule by default, move it up using the "Move up" link. See attached image for reference. 

Restart IIS to apply the changes.

Configure RMsis Server :

The server configuration in RMsis will be :


  • RMsis Server Scheme : http (scheme on which RMsis server will be running)
  • RMsis Host Name : 10.1.1.1 (Host name or the IP address of the RMsis Server)
  • RMsis Port : 3060 (Port number for RMsis Server)
    • The above three will create Link #3 in Figure 1
  • Enable Reverse Proxy : Enabled
  • Reverse Proxy Scheme : https (scheme on which Reverse Proxy Server will be running)
  • Reverse Proxy Host Name : jira.example.com (Host name of Reverse Proxy Server)
  • Reverse Proxy Port : 443 (Port number of Reverse Proxy Server)
  • Enable Debugging : Enabled
  • JVM Min Memory : 256 MB
  • JVM Max Memory : 1024 MB
  • JIRA Internal URL : http://10.1.1.1:8080/
    • This creates Link #5 in Figure 1. 
    • This is the URL of machine on which JIRA server is running.

    • If JIRA is running behind a reverse proxy server, then make sure, you are not writing the reverse proxy URL.

    • RMsis server communicates with JIRA using JIRA internal URL.


The complete Reverse proxy configuration will look like :

                                   Figure 2 : Reverse Proxy Configuration


Link #1 : Client machine accessing reverse proxy server - https://jira.example.com

Link #2 : Reverse Proxy Server accessing JIRA Server : http://10.1.1.1:8080/JIRA

Link #3 : Reverse Proxy Server accessing RMsis Server : http://10.1.1.1:3060/rm

Link #4 : JIRA Server accessing RMsis Server : http://127.0.0.1:42045/rm (here 42045 is an internal port selected automatically by RMsis. If this port is not available, RMsis will select a different port)

Link #5 : RMsis Server accessing JIRA Server : http://10.1.1.1:8080/jira

Note : 

For this configuration to work correctly, the reverse proxy should not be blocking access from 

  • JIRA to RMsis
  • RMsis to JIRA

Further references:

A guide to reverse proxy in IIS is available here: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing