Wyn Enterprise: Deploying with a Reverse Proxy

You can use IIS as reverse proxy to deploy Wyn Enterprise with HTTPS.

  1. Install Wyn Enterprise.
  2. In Control Panel, open Administrative Tools > Internet Information Services (IIS) Manager.
  3. In IIS Manager, in the left pane under Actions, select Wyn Enterprise server and click the Create Self-Signed Certificate.. to create a self-signed https certificate.

  4. In the Create Self-Signed Certificate dialog, choose the following options and click OK.

Note: For the purpose of this guide, we will use 'wyn-cert'. You can use the name of the certificate that you want to install on IIS for the HTTPS URL you are setting up.

  1. Create a website in IIS, use https as the binding type.

Note: For the purpose of this guide, we will use 'wyn-on-iis.grapecity.net' as the hostname setting. You should use the name of the web URL you are setting up to be the website the end users use. Also, the certificate used here is the one initialized in the previous step.

  1. To install the Web Platform Installer, you can download the installer from here: https://www.iis.net/downloads/microsoft/web-platform-installer.

  2. Run the Web Platform Installer and install the URL Rewrite model and the Application Request Routing model. For that, first search for URL Rewrite and click Add.

  3. Search for Application Request Routing and click Add.

  4. Click Install and I Accept in the Web Platform Installer.

  5. In the IIS Manager, add reverse proxy. To do that, select URL Rewrite.

  6. In the left pane under Actions, select Add Rule(s)... for URL Rewrite.

  7. Enter the server name in the Add Reverse Proxy Rules dialog.

Note: This is the internal URL which points to the Wyn Enterprise server installation. The incoming requests from the end users will be redirected to this location by IIS. For the purpose of this guide, we have used 'localhost:51980' as an example.

  1. In the left pane under Actions, click View Server Variables.. to add server variables 'HTTP_X_FORWARDED_HOST' and 'HTTP_X_FORWARDED_PROTO'.
  2. In the left pane under Actions, click Add...
  3. In the Add Server Variable dialog, enter the name HTTP_X_FORWARDED_HOST and click OK.

  4. To add the second server variable, in the left pane under Actions, click Add.. and enter the name HTTP_X_FORWARDED_PROTO in the Add Server Variable dialog. Click OK.

  5. To edit the reverse proxy, select the ReverseProxyUnboundRule1 (that you created in step 12 above) and, in the left pane under Inbound Rules, click Edit.

  6. To set the value of server variables, under Server Variables, click Add...

  7. In the Set Server Variable dialog, set the value for HTTP_X_FORWARDED_HOST as in the screenshot below and click OK.

Note: For the purpose of this guide, we will use 'wyn-on-iis.grapecity.net' as the value setting. You should use the web URL you are setting up to be the website the end users use.

  1. Under Server Variables, click Add.. again.
  2. In the Set Server Variable dialog, set the value for HTTP_X_FORWARDED_PROTO as shown in the screenshot and click OK.
  3. In the left pane under Actions, click Apply.

  4. Back in the IIS Manager, enable the feature to preserve the host headers. To do this, select the Configuration Editor.

  5. In the Section selector, fine the section for 'system.webServer/proxy'.

  6. In this section change the setting for 'preserveHostHeader' to 'true'. Apply these changes (if any).

  1. Modify the configuration file as shown below. Update the 'IdentityServerUrl' and 'AuthorizedWebApplicationUrls' to match the web URL you are setting up for the end users to access. Also, set the 'RequireHttps' element to 'true' if you are using HTTPS as well.
    <?xml version="1.0" encoding="utf-8"?>

    <SystemConfig xmlns:sys="https://extendedxmlserializer.github.io/system" xmlns="clr-namespace:ConfigMigration.Configuration.V32;assembly=ConfigMigration">
    <Version>3.2</Version>
    <GlobalSettings>
        <!-- Use your public web URL here. -->
        <IdentityServerUrl>https://wyn-on-iis.grapecity.net</IdentityServerUrl>
    </GlobalSettings>
    <Services>
        <Server>
        <Urls>http://*:51981</Urls>
        </Server>
        <Portal>
        <Urls>http://*:51980</Urls>
        <RequireHttps>true</RequireHttps>
        <AuthorizedWebApplicationUrls>
            <!-- Use your public web URL here. -->
            <sys:string>https://wyn-on-iis.grapecity.net</sys:string>
        </AuthorizedWebApplicationUrls>
        </Portal>
        <Worker>
        <Urls>http://localhost:51982</Urls>
        </Worker>
        <CotWorker>
        <Urls>http://localhost:51983</Urls>
        </CotWorker>
    </Services>
    </SystemConfig>

  1. Restart the Wyn Service.
    Now you can visit the Portal page at the following URL: http://wyn-on-iis.grapecity.net

Note: For the purpose of this guide, we have used 'wyn-on-iis.grapecity.net' as the public URL. You should use the name of the web URL you are setting up to be the website the end users use.