Reverse proxy | Unosquare passcorepro

By geoperez - 7/12/2019

passcorepro runs in a lightweight webserver from Unosquare named EmbedIO. This web server has a small memory footprint and it's a reliable solution to most scenarios. But it's hard to configure with an SSL certificate, for example.

For the previous reason, for any other IT reason in your corporation, you can choose to create a Reverse Proxy with IIS (Internet Information Services) at Windows Server.

The Reverse Proxy works like a gateway between the user and passcorepro. The user will request all the HTTP traffic to the Reverse Proxy, and this one will reroute to the internal passcorepro service.

The process is very simple. First, you need to install an add-on, URL Rewrite using Microsoft Web Platform Installer. This add-on adds the ability to IIS to check the incoming URL request and perform transformations. In this case, route the traffic.

Selecting URL Rewrite add-on

After installing the add-on, you can create a new Web Site with the required binding (hostname, port and SSL certificate) and then select the URL Rewrite option in the IIS Admin Console.

The next step is to create a new Rule and select Reverse Proxy in the Add Rule menu option and dialog. The Add Reverse Proxy Rules dialog will show some fields where we can fill the inbound rule to forward the incoming traffic to passcorepro.

Selecting Reverse Proxy

In this moment, you may be asked to install Application Request Routing. This is another add-on for forward traffic to another webserver.

The default setting of passcorepro will open the port 8686 at localhost. So you can type "localhost:8686" as the inbound rule and use the same value for the URL rewrite in the Outbound Rules section.

Setup Reverse Proxy

When the rule is created, you can test browsing to your chosen binding in IIS and see how the server will respond with passcorepro. It's a pretty simple and straightforward process that you can do in a couple of minutes.

Additional information of Setup IIS with URL Rewrite as a Reverse Proxy

Comments