Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error 404.4 The resource you are looking for does not have a handler associated with it

Tags:

node.js

iis-10

HTTP Error 404.4 - Not Found The resource you are looking for does not have a handler associated with it.

web.config

<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <clear />

                <rule name="ReverseProxyInboundRule1" stopProcessing="true">
                    <match url="(.*)" />
                    <action type="Rewrite" url="http://localhost:3000/{R:1}"  />
                </rule>

            </rules>
        </rewrite>

    </system.webServer>
    </location>
</configuration>

I want to redirect mywebsite.com to http://localhost:3000

  • mywebsite.com is in iis and host file
  • http://localhost:3000 is a nodejs running the website
  • I installed Application Request Routing and url-rewrite
  • I set iusr permission on site folder
  • The redirect works on my windows server 2016 but not on win 10
like image 242
manwithplanet Avatar asked May 15 '18 17:05

manwithplanet


1 Answers

You need to enable IIS to route the requests to nodejs.

First, download the Application Request Routing either by downloading on the IIS website or using the 'Web Platform Installer' in IIS Manager.

Next, on IIS Manager, select your server and under the IIS category, open Application Request Routing Cache.

On the right side of the screen, select 'Server Proxy Settings...' and tick enable proxy in the form.

After these steps, you may be able to connect to node correctly.

For reference: https://learn.microsoft.com/en-us/iis/extensions/configuring-application-request-routing-arr/creating-a-forward-proxy-using-application-request-routing

like image 136
Flávio Diniz Rossetto Junior Avatar answered Oct 17 '22 07:10

Flávio Diniz Rossetto Junior