Using HTTPS on IIS
Last updated
Last updated
This article explains how to use Microsoft Internet Information Server (IIS) as an HTTPS proxy on top of Starcounter. While NGINX might be a better web server overall, it requires a separate Linux machine. IIS can be installed alongside Starcounter on the same Windows machine.
IIS is available from the Turn Windows features on or off
console.
The following items should be installed.
You can add any extra features if needed.
Open Internet Information Services (IIS) Manager from the Start menu. And install the following components with Get New Web Platform Components
.
URL Rewrite 2.0
Application Request Routing 3.0
Enable system.webServer/webSocket
configuration section via Configuration Editor.
Restart the machine.
Open Application Request Routing Cache
section and go to it's settings page.
Enable proxy, update timeout to 600
seconds, and click the Apply
button.
By default there should be a Default Web Site
item in the Sites
section of IIS. The website should listen on the 80
port. Check that by opening http://localhost/
in your browser. It should show the default IIS webpage.
Create and configure a new website if the default one is missing or you want to listen on another port rather than 80
.
Create a self signed HTTPS certificate and assign it to the website which should be used as a proxy.
Open https://localhost/
in your browser and make sure that the default IIS webpage is also shown.
Open or create web.config
file in the root folder of the website and update it's content to the following.
Note: the rule names can be anything, but better keep it meaningful. The 8080
port should be updated with the port of the Starcounter database IIS should redirect to.
Make sure that Starcounter database is running and the proxy is working.
http://localhost/
should redirect to https://localhost/
https://localhost/
should open http://localhost:8080/