Skip to content Skip to sidebar Skip to footer

How To Successfully Run Node Server With IIS?

So I have a web application with ISS-10, running on wwww.mymindmapper.com and listening on port:80. I have two simple pages (login.html & register.html). Here is what it looks

Solution 1:

Buddy, there is no need to set up the outbound rules. the above settings you wrote is enough to forward the IIS requests to node server.
enter image description here
In Application Request Routing, enable proxy functionality.
enter image description here
Index.js

var express=require('express');
var app=express();
app.get('/',function(req,res){
    res.send('Hello World');
})
app.listen(3000,function(){
    console.log("Example app listening on port 3000!");
})

My IIS site bindings.
enter image description here
Result.
enter image description here
Adding the Reverse Proxy Rules generates a webconfig file with below content.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="ReverseProxyInboundRule1" stopProcessing="true">
                    <match url="(.*)" />
                    <action type="Rewrite" url="http://localhost:3000/{R:1}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

Besides, if you have created a server farm in the server farms, please remove it or add the local IP as the default server. Otherwise, there will be an error that cannot connect to the server.
Feel free to let me know if the problem still exists.


Post a Comment for "How To Successfully Run Node Server With IIS?"