-1

I am working with Windows Server 2012, iisnode, mongodb and nodejs.

My question is simple:

if i do this: ip:port/index.html index.html loads, authenticated connection to mongo db succeeds, and queries are possible...

if i do this: mydomain.com:port/index.html index.html loads, authenticated connection to mongo db succeeds, and queries are possible...

but if I do this: mydomain.com index.html loads, authenticated connection to mongo db succeeds but queries do not work; I get:

404 - File or directory not found.

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

chran
  • 119
  • 8

1 Answers1

0

after many hours of this and that...

the answer was the port settings. node was listening on port 35100 while the requests where coming in on port 80. that is why in my original question, the two cases that included the port number worked. when i forwarded port 80 to 35100 the mongo db worked.

to forward port 80 just type this in the command prompt on the windows server:

netsh interface portproxy add v4tov4 listenport=80 listenaddress="xxx.xxx.xxx.xxx" connectport=35100 connectaddress="xxx.xxx.xxx.xxx"

I answered my own question here in hope of helping other nodejs users because I did not find an answer related to nodejs or mongo. These instructions exist in several answers i looked at after the fact.

chran
  • 119
  • 8