Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I deployed node.js to Amazon EC2 Windows instance. Here is the js code which I run:

require('http').createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(80);

It works perfectly when I am accessing http://localhost But it doesn't work when I'm trying to access the server through external IP: http://[external IP]

when I run "netstat -ano" I can see this line:

0.0.0.0:80

if I run IIS, then it adds two lines

0.0.0.0:80
[::]:80

What does [::] mean? And why it's not added when I run node.js? I think, that is why node.js isn't serving requests to external IP. How can I make node.js work on Windows?

share|improve this question
3  
[::]:80 is for IPv6; you can disable IPv6 by going to your network adapter properties and unchecking it. As for why it's not working, have you added an exception to your Windows Firewall for HTTP (port 80)? –  gravyface Nov 14 '11 at 11:42
    
Thanks gravyface! You answered the question. node.exe was blocked by Windows Firewall –  bsnote Nov 14 '11 at 11:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.