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

  1. In the Connections panel, click on a server to display it in the central pane. Click on Application Request Routing.
  2. In the Actions panel, under the Proxy section, click Server Proxy Settings to display proxy settings for ARR in the central pane.
  3. 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.
  4. In the Connections panel, under Sites, select the website that publishes the proxy server component.
  5. In the central pane, double-click URL Rewrite.
  6. In the Actions panel, under Manage Server Variables, click on View Server Variables to display it in the central pane.
  7. In the Actions panel, click Add to open the Add Server Variable dialog box.
  8. In the Add Server Variable dialog box, enter HTTP_ACCEPT_ENCODING and click OK.
  9. In the Actions panel, click Add to open the Add Server Variable dialog box again.
  10. In the Add Server Variable dialog box, enter HTTP_SERVERURL and click OK.
  11. In the Actions panel, click Back to Rules to return URL Rewrite to the central pane.
  12. In the Actions panel, click Add Rules(s) to open the Add Rule(s) dialog box.
  13. In the Add Rule(s) dialog box, under Inbound Rules, click on Blank rule then click OK.
  14. 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.
  15. Expand the Conditions section and click the Add button to open the Add Condition dialog box.
  16. 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.
  17. Click OK to save the new condition.
  18. 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 ^/?$
  19. Click OK to save the new condition and then click Apply in the Actions panel to save the inbound rule settings.
  20. For email servers only: Add another condition for the email exchange URL Rewrite rule. This condition checks whether the SERVERURL header is null.
    1. In the Add Condition dialog box, enter the following values:
      Condition Input {HTTP_SERVERURL}
      Check If Input String Does not match the Pattern
      Pattern ^\?$
    2. Click OK to save the new condition.
  21. For non-email servers only: Add a new outbound rule.
    1. In the Actions panel, click Add Rules(s) to open the Add Rule(s) dialog box.
    2. In the Add Rule(s) dialog box, under Outbound Rules, click on Blank rule then click OK.
    3. In the central pane, edit the outbound rule by entering the following values in the appropriate fields:
      Name ReverseProxyOutboundRule1
      Pattern ^http(s)?://webserverdomainname/(.*)
      Value http{R:1}://webserverdomainname/{R:2}
      Note: This is the proxy server.
    4. Click Apply in the Actions panel to save the change.
  22. 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.
  23. In the Add Precondition dialog box, enter the following values:
    Name ResponseIsHtml1
    Using Regular Expressions
    Logical Grouping Match All
  24. 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
  25. Click OK to add the condition to the new precondition.
  26. In the Add Precondition dialog box, click OK to save the precondition.
  27. In the Actions panel, click Apply.
  28. 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.