Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Remove slash after api/

Windows IIS can be configured to act as a reverse proxy server. There are a few pretty outdated guidelines available on the official Microsoft documentation where you can find additional information.

Install IIS extensions

To set up a reverse proxy routing capabilities for IIS, first of all, you need to download and install two additional extensions:

After successful installation of extensions, two additional options, URL Rewrite and Application Request Routing, will appear on the IIS dashboard.

Enable proxy settings - ARR

The IIS proxy setting is disabled by default. You need to enable it.

1. Open IIS Manager.

2. In the Feature View section, double click on Application Request Routing.

Image Added

3. On the right sidebar under the Proxy section, select Server Proxy Settings... action.

Image Added

4. Check Enable proxy check box. And then on the right sidebar with actions, click Apply to save changes.

Image Added

URL Rewrite

To create a new inbound rule, follow these steps:

1. Go to the IIS Manager, find Default Web Site and select wscservice virtual directory (for older versions it may differ, e.g. spellcheck) assuming that WebSpellChecker is deployed there. 

2. In the Feature View, click URL Rewrite.

Image Added

3. Click on Add Rule(s)... on the right sidebar with actions.

Image Added

4. In the Add rule(s) dialog, select Blank rule template for inbound rules and click OK.

5. Create Inbound rule for the parent website with the following settings:

  • Pattern: api(.*)
  • Check the Ignore case box.
  • Rewrite URL: http://localhost:2880/{R:1} where http://localhost:2880/ is the path to the application server which listens to the 2880 port and {R:1}.
Note

If you previously configured the SSL connection for AppServer, e.g. accessed the service entry point via https://localhost:2880/, it is highly recommended to disable this configuration and rely on the SSL management on IIS. To disable SSL connection for AppServer, go to AppServerX.xml file, locate EnableSSL tag and change its value to false. to apply changes, restart AppServer.

6. Check Append query string check box.

7. Check Stop processing of subsequent rules check box.

8. Once all is done, click Apply Rule.

Verification

In your browser, check version and status of AppServer to verify if it works properly.

Check the version: https://localhost/wscservice/api?cmd=ver

Code Block
languagejs
{"Copyright":"(c) 2000-2021 WebSpellChecker LLC","ProductWebsite":"webspellchecker.com","ProgramVersion":"5.x.x.x x64 master:29de6551 (2806) #371","PackageVersion":"5.x.x.x master:25fe1fc (693) #438"}

Check the status: https://localhost/wscservice/api?cmd=status

Code Block
languagejs
{
    "SpellCheckEngine": {
        "active": true
    },
    "GrammarCheckEngine": {
        "active": true
    },
    "ThesaurusEngine": {
        "active": true
    }
}

Coming soon.

Pretty old guideline on official Microsoft documentation: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing

One more: https://docs.microsoft.com/en-us/archive/blogs/friis/setup-iis-with-url-rewrite-as-a-reverse-proxy-for-real-world-apps

...