diff --git a/iis/reverse-proxy-to-ds/README.md b/iis/reverse-proxy-to-ds/README.md new file mode 100644 index 0000000..f7ded19 --- /dev/null +++ b/iis/reverse-proxy-to-ds/README.md @@ -0,0 +1,64 @@ +## What this is for +This guide explains how to setup your IIS to allow connections to DocumentServer instance with HTTP/HTTPS using IIS as reverse proxy. + +## How to use it + +### Step 1 +Edit the **web.config** file. Find `rewrite.rules` in the `configuration` section: +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` +And replace the `` value with DocumentServer real IP (when on local network) or Internet address. After that Workspace will be accessible from your IIS ip/dns address. + +### Step 2 +Install the additional IIS components: +* [Application Request Routing](https://www.iis.net/downloads/microsoft/application-request-routing) - you can download it here - https://www.iis.net/downloads/microsoft/application-request-routing. After the download, run the installation file and follow the wizard. Then go to the IIS manager, open ARR settings and check the **Enable proxy** check-box. +* [URL Rewrite Module](https://www.iis.net/downloads/microsoft/url-rewrite) - you can download it here - https://www.iis.net/downloads/microsoft/url-rewrite. After the download, run the installation file and follow the wizard. Then go to the **Control Panel**, choose **Programs and Features**, then **Turn Windows features on or off** and there expand **Internet Information Services** > **World Wide Web Services** > **Application Development Features** and check the **WebSocket Protocol** option. Click **OK** and wait until the feature is installed. + +### Step 3 +Add IIS server variables. You will need to add `HTTP_X_FORWARDED_PROTO`,`HTTP_X_FORWARDED_HOST`,`HTTP_THE_SCHEME` and `HTTP_THE_HOST` as new IIS server variables. This can be done the following way: +* Go to the IIS Manager, select the website, then open **URL Rewrite**. +* In the right-side menu locate **Manage Server Variables** and click **View Server Variables**. +* Use the **Add...** action and add the `HTTP_X_FORWARDED_PROTO`,`HTTP_X_FORWARDED_HOST`,`HTTP_THE_SCHEME` and `HTTP_THE_HOST` one after another. +More information on adding the variables to the IIS server can be found [here](https://www.iis.net/learn/extensions/url-rewrite-module/setting-http-request-headers-and-iis-server-variables). + +> **Tip**: This config also can be used for proxy connections for some another products. For example Docker-Workspace. diff --git a/iis/reverse-proxy-to-ds/web.config b/iis/reverse-proxy-to-ds/web.config new file mode 100644 index 0000000..55f8c00 --- /dev/null +++ b/iis/reverse-proxy-to-ds/web.config @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +