St Ch
St Ch

Reputation: 1

Trying to explose web app to local network through URL rewrite. Returns 404 instead

I have an app hosted on localhost:8080 on a Windows Server 2019. I can access this application using a browser through remote desktop connection to the Windows Server in question and hitting one of the following url requests:

http://localhost:8080/catalogexplorer/

or

http://<host name>:8080/catalogexplorer/

I want to expose the app to other machines of the same local network, so after looking around online a bit, i installed URL Rewrite module and added to web.config the following:

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

Sending the following request http://<host name>/catalogexplorer/ using a browser within the remote desktop on the Windows Server itself redirects to:

http://localhost:8080/catalogexplorer/

However, sending the same request from any pc in the local network returns a 404.

I have tried comparing the activated tools and features of the IIS with other successful installations i have done in the past on separate servers (different networks) and i am unable to spot any difference. Even the syntax of the rule is the same as in previous cases.

Upvotes: 0

Views: 142

Answers (1)

St Ch
St Ch

Reputation: 1

After a little more digging, i found a question that i missed on my initial search through stackoverflow:

URL rewrite in IIS 8.5 is not working I'm getting 404 instead

The proposed solution to activate reverse proxy worked for me, it required also installing ARR.

Upvotes: 0

Related Questions