Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I run the following script

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

by doing:

node hello.js &

curl localhost

I get:

Hello World

But when I try to access this page from my PC (which is not the same computer as this server), it gives me a 'this webpage can not be found' error. This can't be a problem with the firewall because I can run nginx on port 80 just fine.

share|improve this question
Still running on That IP is local to the machine and not the local network. – Alister Bulman Feb 11 '11 at 0:30
whoops you are right :(. – quilby Feb 11 '11 at 0:39

You told the server to listen on and this is a internal ip of host 1

which is not reachable from outside: tell your server to listen to and then it works

share|improve this answer

Change the to your external IP. Thank you to alister bulman.

share|improve this answer
It's perfectly fine to mark your own answer as accepted, if it solves the problem. You won't get rep for it, but others will upvote if it works for them. – sysadmin1138 Feb 11 '11 at 0:46
better - mark an answer as the solution! :-D – Alister Bulman Feb 11 '11 at 0:51

Still running on That IP is local to the machine and not the local network. You need a network IP address.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.