title: How do I run Node.js on port 80?
body: <p>My aim is to run Node.js on port 80. This is because I am finding node.js is being blocked from certain networks which do not allow traffic from any other port.</p>
  
  <p>It appears that the best way to do this is by proxying Apache through Node.js. I have tried using <a href="https://github.com/nodejitsu/node-http-proxy">node-http-proxy</a> to do this but I have not had any luck. </p>
  
  <p>The code I am using is here:</p>
  
  <pre><code>var util = require('util'),
      http = require('http'),
      httpProxy = require('http-proxy');
  
  httpProxy.createServer(9000, 'localhost').listen(80);
  
  http.createServer(function (req, res) {
    res.writeHead(200, { 'Content-Type': 'text/plain' });
    res.write('request successfully proxied to: ' + req.url + '\n' + JSON.stringify(req.headers, true, 2));
    res.end();
  }).listen(9000);
  </code></pre>
  
  <p>But I keep getting the error "Address in use" for port 80. I must be doing something wrong.</p>
  
  <p>How do I proxy Apache through node.js using node-http-proxy? Will this enable me to run node.js on port 80? And is node-http-proxy the best way to achieve this?</p>
  
  <p>Thank you.</p>