Difference between revisions of "IIS as Reverse Proxy"

From MgmtWiki
Jump to: navigation, search
(Example)
(Example)
Line 13: Line 13:
 
#Click Install - this takes several minutes
 
#Click Install - this takes several minutes
 
#Install additional Microsoft IIS modules (If unsure go to cmd.exe and type %windir%\system32\inetsrv\config\applicationhost.config, and search for the string "<globalModules>".
 
#Install additional Microsoft IIS modules (If unsure go to cmd.exe and type %windir%\system32\inetsrv\config\applicationhost.config, and search for the string "<globalModules>".
##Install the Windows URL RewriteModule. It can be downloaded from https://www.iis.net/downloads/microsoft/url-rewrite
+
##Install the Windows URL RewriteModule. It can be downloaded from https://www.iis.net/downloads/microsoft/url-rewrite (may be present already)
 
##Install Application Request Routing (ARR). It can be downloaded from https://www.iis.net/downloads/microsoft/application-request-routing
 
##Install Application Request Routing (ARR). It can be downloaded from https://www.iis.net/downloads/microsoft/application-request-routing
 
 
#Open Internet Information services (IIS) manager (for example from administrative tools)
 
#Open Internet Information services (IIS) manager (for example from administrative tools)
 
#Click on the Server in the left pane (click a second time if you don't see sites)
 
#Click on the Server in the left pane (click a second time if you don't see sites)
 
#Click on sites
 
#Click on sites
 +
#Add an new site with some friendly name that will be used to navigate to the site - point to some empty file directory, for example C:\inetpub\wwwroot\tomjones, leave rest empty
 +
 +
 
#Clink on (typically) Default Web Site (the rewrite rules created here will apply to all of the sub-sites, which is probably the place to be)
 
#Clink on (typically) Default Web Site (the rewrite rules created here will apply to all of the sub-sites, which is probably the place to be)
 
#Double click on "URL Rewrite" in the center pane. - the assumption here is that there are no existing rules, if there are it gets complicated.
 
#Double click on "URL Rewrite" in the center pane. - the assumption here is that there are no existing rules, if there are it gets complicated.

Revision as of 15:56, 8 November 2019

Full Title

Using Windows Server as a Reverse Proxy for IIS 8 and above (Server 2012 and above).

Context

  • It is often necessary to us a Reverse Proxy to terminate HTTPS requests and then forward those requests to specific server instances for load balancing or similar services.

Example

Goal: Redirect https: requests to a separate IIS instance (or site) which only supports http: scheme.

  1. Open the Server Manager - select the computer to run manager and "add Roles and Features Wizard
  2. Select "Role-based or feature-based Installation - click next
  3. Select Server - click next
  4. Select Web Server (IIS) - it is assumed that IIS has already been installed - if not do that
  5. Add security features - Request Filtering, Basic Authentication - Windows Authentication
  6. Click Install - this takes several minutes
  7. Install additional Microsoft IIS modules (If unsure go to cmd.exe and type %windir%\system32\inetsrv\config\applicationhost.config, and search for the string "<globalModules>".
    1. Install the Windows URL RewriteModule. It can be downloaded from https://www.iis.net/downloads/microsoft/url-rewrite (may be present already)
    2. Install Application Request Routing (ARR). It can be downloaded from https://www.iis.net/downloads/microsoft/application-request-routing
  8. Open Internet Information services (IIS) manager (for example from administrative tools)
  9. Click on the Server in the left pane (click a second time if you don't see sites)
  10. Click on sites
  11. Add an new site with some friendly name that will be used to navigate to the site - point to some empty file directory, for example C:\inetpub\wwwroot\tomjones, leave rest empty


  1. Clink on (typically) Default Web Site (the rewrite rules created here will apply to all of the sub-sites, which is probably the place to be)
  2. Double click on "URL Rewrite" in the center pane. - the assumption here is that there are no existing rules, if there are it gets complicated.
  3. Click "Add Rule" in the right pane.

References