docs: Guide for IIS reverse proxy

This commit is contained in:
Daniel Lee
2018-01-12 17:02:10 +01:00
parent 594447f5f5
commit 77b5dee408
2 changed files with 122 additions and 0 deletions
+33
View File
@@ -68,5 +68,38 @@ server {
}
}
```
### IIS URL Rewrite Rule (Windows) with Subpath
IIS requires that the URL Rewrite module is installed.
Given:
- subpath `grafana`
- Grafana installed on `http://localhost:3000`
- server config:
```bash
[server]
domain = localhost:8080
root_url = %(protocol)s://%(domain)s:/grafana
```
Create an Inbound Rule for the parent website (localhost:8080 in this example) with the following settings:
- pattern: `grafana(/)?(.*)`
- check the `Ignore case` checkbox
- rewrite url set to `http://localhost:3000/{R:2}`
- check the `Append query string` checkbox
- check the `Stop processing of subsequent rules` checkbox
The rewrite rule that is generated for the web.config:
```xml
<rewrite>
<rules>
<rule name="Grafana" enabled="true" stopProcessing="true">
<match url="grafana(/)?(.*)" />
<action type="Rewrite" url="http://localhost:3000/{R:2}" logRewrittenUrl="false" />
</rule>
</rules>
</rewrite>
```