DEV Community

Discussion on: Hosting a Node.js application on Windows with IIS as reverse proxy

Collapse
 
brunoarcoverdediniz profile image
BrunoArcoverdeDiniz • Edited

Hi Peter,

I have a nodeJS app with a express server running on port 443. I followed your steps and my index.html seems to work using hostname:443 in the Url. but when i login and it redirects to home.html (as supposed to) page. But it starts using localhost:443/home.html once again. How to i get rid of the localhost:443 in the home.html pages as well?

Collapse
 
brunoarcoverdediniz profile image
BrunoArcoverdeDiniz • Edited

I added a second reverse proxy rule with localhost:443/home.html... But didn't work
What else would i need to do to make the other pages in my app change as well ?

Collapse
 
petereysermans profile image
Peter Eysermans

If you use IIS as a reverse proxy you should not see the port of the nodejs application in your URL. IIS forwards the request to the nodejs application without the user noticing. Port 443 is the default port for https connections, I would not use it as the port for the nodejs application. I recommend changing the port to a port that is not commonly used, somewhere in the 3000 range for example.