Directing web traffic to multiple web servers [Answered]RSS

3 replies

Last post Jul 21, 2016 07:21 AM by Jean Sun

  • Directing web traffic to multiple web servers

    Jul 19, 2016 11:17 PM|MartyNZ-10|LINK

    Could some-one please explain the configuration required to achieve the following scenario:

    2 web servers, both IIS 8 on Windows Server 2012, 1 public IP address

    1 for published web sites

    1 for development/testing

    I would like to direct traffic to the relevant web server based on the url of the request. ie

    a request is received for http://mypublicsite.com which is hosted on WebServ-01

    another request is received for http://mydevsite.com which is hosted on WebDev-01

    I understand I need ARR and Url rewrite to achieve this. Both are installed on WebServ-01 and the perimeter firewall currently directs all web traffic to WebServ-01.

    I'm sure this is achievable but I haven't been able to find a post that describes this scenario.

    TIA

    MartyNZ

  • Re: Directing web traffic to multiple web servers

    Jul 20, 2016 01:33 AM|Jean Sun|LINK

    Hi,

    Based on my understanding, you want to make http://mypublicsite.com to  WebServ-01 and http://mydevsite.com to WebDev-01.

    I think you don't need URL Rewrite. You can just bind the domains to related websites. Then configure the domain name in the DNS settings.

    http://mypublicsite.com : WebServ-01

    http://mydevsite.com     : WebDev-01

    Reference Link : http://www.iisunderground.com/add-a-new-website-iis-7-5/

    Best Regards,

    Jean

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
  • Re: Directing web traffic to multiple web servers

    Jul 21, 2016 03:37 AM|MartyNZ-10|LINK

    I guessing that from your answer I needed to mention that the http requests are coming from the internet ie. external requests not internal... Only 1 public IP address so DNS is no help.

  • Re: Directing web traffic to multiple web servers

    Jul 21, 2016 07:21 AM|Jean Sun|LINK

    Hi,

    Based on my understanding, you need to configure the WebServ-01 as reverse proxy.

    And you need to configure two domains to point to the WebServ-01. Then you can use url rewrite to rewrite domain based on the domain name.

    <rule name="Dev" patternSyntax="ECMAScript" stopProcessing="true">
      <match url=".*" />
      <conditions logicalGrouping="MatchAll">
        <add input="{HTTP_HOST}" pattern="mydevsite.com" />
      </conditions>
      <action type="Rewrite" url="Dev Server" />
    </rule>

    Best Regards,

    Jean

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.