Reverse proxy configuration [Answered]RSS

1 reply

Last post Mar 26, 2020 07:21 AM by Yuk Ding

  • Reverse proxy configuration

    Mar 25, 2020 10:57 AM|DRDG|LINK

    Hi,

    I have the following scenario for one of my customers and I can't figure out how to get it working.

    1 internal IIS with ~hundred of sites that needs to be published online

    1 DMZ IIS with ARR installed

    All of the websites on the internal IIS has the following bindings:

    site1.example.com

    site2.example.com

    site3.example.com

    And so on...

    How can I get the IIS in the DMZ to act as a reverse proxy for all these sites? I have tried some different configurations but I always end up being redirected to the internal IIS Default Website no matter what URL i use. 

    Thank you!

  • Re: Reverse proxy configuration

    Mar 26, 2020 07:21 AM|Yuk Ding|LINK

    Hi DRDG,

    For example, if you have an external domain external.site1.example.com and you want to reverse proxy it to site1.example.com

    1.You need to create a website in DMZ server. 

    2. Creating a binding host header of your external domain

    3.Make sure the website can be accessed from external and your DMZ server is able to access internal website.

    4.Enable proxy in IIS manager->server node-> application request routin cache->Server proxy settings->Enable proxy.

    5.Create a rewrite rule to based on your server

      <rule name="reverse proxy">
                        <match url="(.*)" />
                        <conditions>
                            <add input="{HTTP_HOST}" pattern="external.site1.example.com" />
                        </conditions>
                        <action type="Rewrite" url="http://site1.example.com/{R:1}" />
                    </rule>

    You can use single DMZ website to distribute requests. As long as you create multiple binding host header with different host name and filter the rewrite rule based on {HTTP_HOST} variable.

    Best Regards,

    Jokies Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.