Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

IIS has several websites:


There is also a TomCat running on


The challenge is how to expose the TomCat externally as

What I did:

  • Enabled Proxy in ARR in IIS
  • Added Reverse Proxy URL Rewrite rules on

            <rule name="ReverseProxyInboundRule1" stopProcessing="true">
                <match url="(.*)" />
                <action type="Rewrite" url="http://localhost:8087/{R:1}" />
            <rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1" >
                <match filterByTags="A, Form, Img" pattern="^http(s)?://localhost:8087/(.*)" />
                <action type="Rewrite" value="http{R:1}://{R:2}" />
                <preCondition name="ResponseIsHtml1">
                    <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />

What I see:

Locally if I navigate to 

my browser shows TomCat website as



Externally if I navigate in Chrome to 

it tries to tunnel to


If I navigate in IE it returns 500 error (Fiddler: HTTP/1.1 500 URL Rewrite Module Error.)

Question: What am I doing wrong? Can it be done and how?

share|improve this question
This might be better addressed in the SuperUser SE. – mdpc Dec 20 '12 at 6:07

Your Action is set to Rewrite so it is rewriting the URL.

In IIS Manager:

  • Right-click Server Farms, click "Create Server Farm". Give it some name.
  • Put the fully-qualified domain name to your Tomcat instance in the "Server name or address" field
  • Click "Advanced settings...", expand "applicationRequestRouting" and change httpPort to 8087
  • Click "Yes" when prompted to create a rewrite rule
  • Click the newly created farm under "Server Farms" in the pane on the left side of the window
  • Open "Routing Rules" on the Server Farm feature view page
  • Click the "URL Rewrite..." link on the right pane
  • Remove the old attempted Tomcat rewrite rule
  • Click "Add Rule(s)..." at the top of the right pane, choose "Blank rule"
  • Give it a name
  • In the Match URL pane:
    • Requested URL: Matches the Pattern
    • Using: Regular Expressions
    • Pattern: *
  • Expand the Conditions pane, click "Add"
    • Condition input: {HTTP_HOST}
    • Check if input string: Matches the pattern
    • Pattern:
    • Check Ignore Case
  • In the Action pane:
    • Action type: Route to Server Farm
    • Scheme: http://
    • Server farm: (the name of your server farm)
    • Path: {R:1} (NOTE: This may need some tinkering but judging by your example it should work)
  • Click "Apply" on the right pane and your
share|improve this answer
The only thing that I did different was making the URL pattern .* instead of * in the Match URL pane, and everything worked perfectly. – Mehmet Ataş Jan 11 '15 at 20:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.