Internet Information Services
IIS (10) Reverse Proxy
1. Install IIS Role on Windows (Server)
- Open Server Manager
- Go to Manage -> Add Roles and Features
- Select Role-based or feature-based installation
- Select your Server
- Enable Webserver (IIS)
- Click Next until the Assistant is done
2. Install ARR and URL Rewrite Module
The "Application Request Routing" Module is required for the Reverse Proxy Behavior
After that, start cmd.exe as Administrator and run iisreset
3. Enable ARR in IIS Manager
- Start the IIS Manager Application (Server Manager -> Tools -> Internet Information Services (IIS) Manager)
- Click on your Server and Select Application Request Routing Cache
- On the right side, click Server Proxy Settings and check Enable Proxy
4. Setup Reverse Proxy Rule
- Open or create your Site
- Click on URL Rewrite
- On the right side, click Add Rule(s)
- Select Blank rule at Inbound Rules
- Give your Rule a Name
- Pattern
Use a Regex Pattern here that matches whatever URL you want to r' proxy
Example: Everything after the URL:^(.*)$ - Action
Rewrite URL is your Target Webserver
With the Pattern specified above, it will capture a Part of it using Regex. With the Example, everything after your URL.
With this, an example Rewrite Url would be:http://localhost:16666/your-application/{R:1}{R:1}is your first captured result.
- Pattern
- Apply and restart your Site.
Windows Authentication for Websites
Windows Authentication on IIS works using the Physical Path' Permissions, configured
in the Basic Settings of the Site.
How to Configure
This applies both for new and existing Sites
- Start the IIS Manager Application (Server Manager -> Tools -> Internet Information Services (IIS) Manager)
- Open or create your Site
The Physical Path Setting here is what counts. If you intend to use it as Reverse Proxy, create a empty "dummy" Directoy for this one - Select your Directory
- If you already have a site, go to Actions -> Basic Settings and update your Physical Path if necessary
- Go to Actions -> Edit Permissions
This will open the Windows Directory Permissions Dialog. Here you can set your Permission. For Web Access, the Read Permission is required. Dependening on your Use-Case, other Permissions such as Write and Execute might be necessary