VisibleThread -
Help Center Find helpful articles on different VisibleThread Products

Follow

How to use Microsoft IIS as a reverse proxy for VT Docs

Prerequisites:

  1. You must install the required extensions for URL Rewrite and APR in Microsoft IIS.
    Url-Rewrite-Download
    Application-Request-Routing-Download 
  2. This guide assumes you are using Microsoft IIS 7

 

Setup the Reverse Proxy

Step 1: Creating a Server Certificate


Note: Step 1 only needs to be done if you don't have an SSL cert for your server already.


1. First step is to create a SSL cert for the VisibleThread Doc server via Microsoft IIS
Open your Microsoft IIS server and navigate to the "Server Certificates" node and double click it.


worddav81077a38563566bf72dd958266d540e2.png


2. In the pane on the right hand side of the window you will see options for creating an SSL cert. For this example I will use a Self-Signed Certifiacte.


worddavd2e55b6d0fbb183b80427f72c7f97a2c.png


3. Click on "Create Self-Signed Certificate" it will prompt you for a friendly name for the cert. Choose a name and hit "ok" and your cert is created.

 

worddaved483e944e39df78685212c6b9f4fc73.png

 


Step 2: Creating a Web-Site


1. To create a Web-Site click navigate to "Sites" in the left pane.


worddav7b2260ca1d8df1a9995c5a9187d8f93c.png


2. After clicking on "Sites" you will see "Add Web Site…." In the pane on the right.


worddav20f006b496a329d6f7b7a84fa684529f.png


3. Click on "Add Web Site…." A window will prompt you for information for your new site.

 

vtdocssite.png
4. Click "ok" once all relevant information is filled out. Your site is now created. Note, if you want public access to your VT Docs application set the I.P as "All Unassigned"

 


Step 3: Setting up the reverse proxy

1. To set up the reverse proxy navigate to your new Web-Site and double click on it, this will open all available nodes for your site. Double click on "URL Rewrite".

 

worddav7fd5345b503cc40b6794592f0a45e0de.png


2. After opening "URL Rewrite" add a new rule by going to the pane on the right and clicking on "Add Rule(s)…."


worddavcf4e5a314981a5a74c869db28fbd0dd5.png


3. Now choose the "Reverse Proxy" option and click "ok"

 

vtdocssite4.png

 

4. Address must be localhost:8080 "Enable SSL Offloading" box is ticked. Click "ok".

 

vtdocssite5.png

 


Step 4: Setting up SSL encryption and port 443

1. To set up SSL encryption and port 443 we just need to add a new binding. Navigate to your Web-Site and you will see in the right pane "Bindings…." Click on this.


worddavaec8dac26fdff83a5993b2a2e3f3ef2a.png

 


2. A window will open and prompt click "Add...". Where it says "http" this is a drop down click here and select "https". Leave it All Unassigned, the default port should be set to 443. At the bottom of the window there is another drop down menu for you to select which SSL cert you wish to use, select your cert. Now click "ok". 

 

vtdocssite3.png

 

Preserve Host Headers

Using "Configuration Editor" on the server level, edit the proxy setting to "Preserve Host Headers"vtdocssite6.png

 

 

Under the "system.webServer/proxy" change "PerserveHostHeaders" to True iis2.png

 

Increase Request Limit

Some of the URLs created by the application will exceed the character limit of IIS. To resolve this you must increase the limit. You can do this by clicking on "Request Filtering" in your site.

iis1.png

 

 

 

Next, click on "Edit Feature Settings"iis2.png

 

 

Lastly, double the default values to match below. Click OK then restart the site.

iis3.png

 

 

Enable HTTP_X_FORWARDED

Open "URL Rewrite" on the server level in your IIS manager, then click "View Server Variables"iis4.png

 

 

Click "ADD" and create the three variables shown in the screenshot below.

iis5.png

HTTP_X_FORWARDED_HOST
HTTP_X_FORWARDED_SCHEMA
HTTP_X_FORWARDED_PROTO

 

Now from your site open "URL Rewrite" and double click your existing ReverseProxy rule to edit it. Under "Server Variables" click "Add..." and the variables you created above should be available in the drop-down menu.

vtdocssite7.png

The Values of the Variables should be:

HTTP_X_FORWARDED_HOST       {HTTP_HOST}
HTTP_X_FORWARDED_SCHEMA     https
HTTP_X_FORWARDED_PROTO      https

iis6.png

 

Set up HTTP -> HTTPS redirection

By default, after completing the IIS Reverse Proxy setup, VT Docs is available on Port 80 (HTTP) and Port 443 (HTTPS). In many cases it may be more desirable to redirect HTTP traffic to HTTPS to enforce encryption. The following steps will set up this redirection.

 

1. Add a new Blank URL Rewrite Rule:

 

2. Set the name. Set the pattern to (.*)

 

3. Setup the following Condition:

 

4. Setup the following Action:

 
5. Save the new rule

Adjust the rule order so that this rule is first:

 

6. Restart the site and test
 

You may need to clear your browser cache for tests to succeed. The site should now be browsable via http://<your-url> or https://<your-url>, redirecting HTTP -> HTTPS automatically.

Was this article helpful?
0 out of 0 found this helpful

Get Additional Help

Visit our Helpdesk for additional help and support.