Setting up Application Request Routing and URL Rewrite
Before you begin
Make sure your computer meets to the system requirements necessary for this procedure at System Requirements for Enterprise Resource Gateway.
About this task
This is the first step of setting up the Enterprise Resource Gateway.
Perform these steps in the Microsoft Internet Information Services (IIS) Manager.
To configure application request routing and URL rewrite:
Procedure
- In the Connections panel, click on a server to display it in the central pane. Click on Application Request Routing.
- In the Actions panel, under the Proxy section, click Server Proxy Settings to display proxy settings for ARR in the central pane.
- In the central pane, select Enable Proxy. Leave the other options and settings at their default values and click Apply in the Actions panel to save your change.
- In the Connections panel, under Sites, select the website that publishes the proxy server component.
- In the central pane, double-click URL Rewrite.
- In the Actions panel, under Manage Server Variables, click on View Server Variables to display it in the central pane.
- In the Actions panel, click Add to open the Add Server Variable dialog box.
-
In the Add Server Variable dialog box, enter
HTTP_ACCEPT_ENCODING
and click OK. - In the Actions panel, click Add to open the Add Server Variable dialog box again.
-
In the Add Server Variable dialog box, enter
HTTP_SERVERURL
and click OK. - In the Actions panel, click Back to Rules to return URL Rewrite to the central pane.
- In the Actions panel, click Add Rules(s) to open the Add Rule(s) dialog box.
- In the Add Rule(s) dialog box, under Inbound Rules, click on Blank rule then click OK.
-
In the central pane, edit the inbound rule by entering the following values in the appropriate fields:
Name ReverseProxyInboundRule1
Pattern ^(.*)
Rewrite URL {HTTP_SERVERURL}/{R:1}
Note: For email servers, the Rewrite URL is:[Exchange URL]/{R:1}
, where[Exchange URL]
is the URL of your exchange server. - Expand the Conditions section and click the Add button to open the Add Condition dialog box.
-
In the Add Condition dialog box, enter the following values:
Condition Input {CACHE_URL}
Check If Input String Matches the Pattern
Pattern ^(https?)://serverdomainname:portnumberERG/Microsoft-Server-ActiveSync
Where the value of serverdomainname is the actual domain name of the website and portnumberERG is the port number of the website on which it is hosted.
Note: If you plan to use a load balancer to distribute traffic between multiple instances of the ERG, enter the domain name of the load balancer. - Click OK to save the new condition.
-
For non-email servers only: Click the Add button
to open the Add Condition dialog box again. For the new
condition, enter the following values:
Condition Input {HTTP_SERVERURL}
Check If Input String Does Not Match the Pattern
Pattern ^/?$
- Click OK to save the new condition and then click Apply in the Actions panel to save the inbound rule settings.
-
For email servers only: Add another condition for the email exchange URL Rewrite rule. This condition checks whether the
SERVERURL
header is null. -
For non-email servers only: Add a new outbound rule.
- While URL Rewrite is still displayed in the central pane, in the Actions panel, under View Preconditions, click Add to open the Add Precondition dialog box.
-
In the Add Precondition dialog box, enter the following values:
Name ResponseIsHtml1
Using Regular Expressions
Logical Grouping Match All
-
Click on the Add button to open the Add Condition dialog box and enter the following values:
Condition Input {RESPONSE_CONTENT_TYPE}
Check If Input String Matches the Pattern
Pattern ^text/html
- Click OK to add the condition to the new precondition.
- In the Add Precondition dialog box, click OK to save the precondition.
- In the Actions panel, click Apply.
- Restart the IIS Server to activate your changes.
What to do next
Proceed to the next step of setting up ERG, Configuring the SOTI MobiControl Root Certificate for ERG.