Reputation: 1026
I have a node js application running on the port 8080
in my Windows server and is accessible from inside of the server by http://localhost:8080
. I want to use some subdomains like app.mydomain.com
without using the port number from outside of the server to open this node.js application. I want to completely all traffics be rewrited to this port and there is no filters for subdirectories.
I've installed ARRv3_0
and urlrewrite2
on my IIS and also restarted the server too. Also installed a certificate on the server and assigned to this IIS website. Currently, I'm using this file as my web.config
:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Reverse Proxy to node server" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://localhost:8080/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Also, I created an index.html file in the website directory too, but there is no difference.
I get 404 when I open the domain with both http
and https
.
Upvotes: 0
Views: 1775
Reputation: 3042
There are some tips you need to pay attention to.
Upvotes: 1