From 45bacfa5c92332c8e1d10f56e55b0bc0ae69a6c4 Mon Sep 17 00:00:00 2001 From: danilapog Date: Thu, 9 Mar 2023 18:07:40 +0300 Subject: [PATCH 1/2] Add iis reverse-proxy config for Docker-Workspace --- iis/proxy-to-docker-workspace/README.md | 62 ++++++++++++++++++++++++ iis/proxy-to-docker-workspace/web.config | 40 +++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 iis/proxy-to-docker-workspace/README.md create mode 100644 iis/proxy-to-docker-workspace/web.config diff --git a/iis/proxy-to-docker-workspace/README.md b/iis/proxy-to-docker-workspace/README.md new file mode 100644 index 0000000..8f374a4 --- /dev/null +++ b/iis/proxy-to-docker-workspace/README.md @@ -0,0 +1,62 @@ +## What this is for +This guide explains how to setup your IIS to allow connections to Docker-Workspace 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 workspace 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). diff --git a/iis/proxy-to-docker-workspace/web.config b/iis/proxy-to-docker-workspace/web.config new file mode 100644 index 0000000..6c4c200 --- /dev/null +++ b/iis/proxy-to-docker-workspace/web.config @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 2a62fc118cf137d61540c3d4157765ff6b1cdeba Mon Sep 17 00:00:00 2001 From: danilapog Date: Fri, 10 Mar 2023 10:13:25 +0300 Subject: [PATCH 2/2] Correction of product names Rename product from WS to DS. Also added a little clarification that the config is suitable for some other products --- .../README.md | 8 +++++--- .../web.config | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) rename iis/{proxy-to-docker-workspace => reverse-proxy-to-ds}/README.md (88%) rename iis/{proxy-to-docker-workspace => reverse-proxy-to-ds}/web.config (94%) diff --git a/iis/proxy-to-docker-workspace/README.md b/iis/reverse-proxy-to-ds/README.md similarity index 88% rename from iis/proxy-to-docker-workspace/README.md rename to iis/reverse-proxy-to-ds/README.md index 8f374a4..f7ded19 100644 --- a/iis/proxy-to-docker-workspace/README.md +++ b/iis/reverse-proxy-to-ds/README.md @@ -1,5 +1,5 @@ ## What this is for -This guide explains how to setup your IIS to allow connections to Docker-Workspace instance with HTTP/HTTPS using IIS as reverse proxy. +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 @@ -32,7 +32,7 @@ Edit the **web.config** file. Find `rewrite.rules` in the `configuration` sectio - + @@ -47,7 +47,7 @@ Edit the **web.config** file. Find `rewrite.rules` in the `configuration` sectio ``` -And replace the `` value with workspace real IP (when on local network) or Internet address. After that Workspace will be accessible from your IIS ip/dns address. +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: @@ -60,3 +60,5 @@ Add IIS server variables. You will need to add `HTTP_X_FORWARDED_PROTO`,`HTTP_X_ * 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/proxy-to-docker-workspace/web.config b/iis/reverse-proxy-to-ds/web.config similarity index 94% rename from iis/proxy-to-docker-workspace/web.config rename to iis/reverse-proxy-to-ds/web.config index 6c4c200..55f8c00 100644 --- a/iis/proxy-to-docker-workspace/web.config +++ b/iis/reverse-proxy-to-ds/web.config @@ -24,7 +24,7 @@ - +