« Previous Next »

Thread: Reverse Proxy refuses to work ...

Last post 06-04-2009 12:52 PM by anilr. 7 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (8 items)

Sort Posts:

  • 05-22-2009, 2:44 PM

    • oosthpa
    • Not Ranked
    • Joined on 05-22-2009, 5:32 PM
    • Posts 4

    Reverse Proxy refuses to work ...

    The problem that I have is the the URL Rewrite module refuses to do a Reverse Proxy if any condititions are set.  If left with only "wildcard" then Reverse Proxy works (not realy a solution).

    The URL Rewite has been updated to version 1.1 to know avail.

    Here is the specific rewrite rule to convert http://www.testportal.test.com:8030 to http://newportal.test.com:8030  (only active rule).

    <rule name="TestRule" patternSyntax="Wildcard" stopProcessing="true">
     <match url="*" />
     <conditions logicalGrouping="MatchAll">
      <add input="{HTTP_HOST}" pattern="testportal.test.com" />
      <add input="{SERVER_PORT}" pattern="8030" />
     </conditions>
     <action type="Rewrite" url="http://newportal.test.com:8030" appendQueryString="true" />
    </rule> 

    I will appreciate if someone could please shine some light on this issue (and please do not say "use ISA")

  • 05-22-2009, 4:22 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: Reverse Proxy refuses to work ...

    Your {HTTP_HOST} condition below will not match the url you gave - did you mean to have *.testportal.test.com ?

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 05-22-2009, 6:15 PM In reply to

    • oosthpa
    • Not Ranked
    • Joined on 05-22-2009, 5:32 PM
    • Posts 4

    Re: Reverse Proxy refuses to work ...

    Sorry the sentense starting with "Here is the specific rule to convert..." should have read http://testportal.test.com:8030 to http://newportal.test.com:8030 

     

  • 05-22-2009, 7:02 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: Reverse Proxy refuses to work ...

    Use failed request tracing to see why your condition is not matching.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 05-26-2009, 7:55 AM In reply to

    • oosthpa
    • Not Ranked
    • Joined on 05-22-2009, 5:32 PM
    • Posts 4

    Re: Reverse Proxy refuses to work ...

    Installed and configured Failed Request Using Tracing. 

    The results were interesting - basically port 8030 could not be handled as an input - kept truncating the port to 80 and displaying the default IIS page. Once port 8030 was excluded from the conditions and client browser (apart from Rewrite action), it started to work.

    Is there a way to include port 8030 in the conditional input patterns and to overcome this limitation?

  • 05-26-2009, 3:18 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: Reverse Proxy refuses to work ...

    Can you paste the part of the failed request trace related to the rule matching?  Also, looking at your conditions again - seems like you would need to match {HTTP_HOST} to testportal.test.com:8030

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 05-27-2009, 4:06 AM In reply to

    • oosthpa
    • Not Ranked
    • Joined on 05-22-2009, 5:32 PM
    • Posts 4

    Re: Reverse Proxy refuses to work ...

    I have amended the {HTTP_HOST} condition, as suggested to include the port (8030) and it is working.  Thanks for that.

    What troubles me is why  <add input="{SERVER_PORT}" pattern="8030" />  is not working.

    I have removed the Tracing capability from the server; if you would like me to reinstall it please let me know.

     

  • 06-04-2009, 12:52 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: Reverse Proxy refuses to work ...

    failed request trace with the original rule would definitely put any speculation on why that rule did not work to rest.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
Page 1 of 1 (8 items)
Microsoft Communities