Chat with us, powered by LiveChat

External address pointing to internal server on a different port | URL Rewrite | Server Farm

Thursday, 15 September 2016

External address pointing to internal server on a different port | URL Rewrite | Server Farm

This post continues from my previous post which outlines the same requirement, but without the use of Server Farms in IIS.  In this post, I will cover the rules required to achieve this whilst using server farms.  It is a different process because the use of Server Farms automatically creates ARR and URL Rewrite rules, so we have to work in with that.

Required Outcome
I have a website gis.domain.com.  This is this forwarded to the gis.domain.com server farm which contains this website.  It is a secondary IIS server.  TCP80 has the primary website.  There is a secondary website called webapp which is accessible on TCP8080.

My client would like to access gis.domain.com/webapp and have it re-write to <servername>.domain.local:8080.

To achieve this, all the work is to be done on the primary IIS website which maintains the Server Farms.

Rule #1
This rule is automatically generated when you set up Server Farms.  It will be called ARR_gis.domain.com_loadbalance

We need to amend this rule to show the following:

I have highlighted the sections that you will need to change from the default rule.  The rest of that rule can be left as-is.

Rule #2
The second rule will need to be created from scratch.  Create a new Blank Inbound Rule:

Add the following settings to that rule.:

Note: the Rewrite address is an internally accessible address only.  This is fine as the server is acting as a reverse proxy and will route the traffic internally on the new port.

Ensure that the Stop processing setting is marked as False for both of the rules.

And that’s it folks.  That’s all you need to get the rules working and to allow forwarding to different websites on different ports when you have a Server Farm.