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.