title: How to configure Socket.io to run on same port on https?
body: <p>As always I have searched my fingers bloody finding an answer to my issue, so I am reaching out to all you geniuses again! :)</p>
  
  <p>I have set up a Node.js server with socket.io (using express) and it runs nice using port 8443. Well it runs :). Since many of my customer doesn't seem to allow traffic on port 8443 they are not able to use my services. </p>
  
  <p><strong>I am wondering how to setup Node.js on port 443</strong> since the site using the Node-server is already using this port (Https). If I try to use port 443 on my Node-server i get: <em>warn - error raised: Error: listen EACCES</em></p>
  
  <p>Part of my Node-js code:</p>
  
  <pre><code>var fs = require('fs');
  var https = require('https');
  var express = require('express');
  var socket = require('socket.io');
  var port = 8443;
  
  var sslOptions = {
    pfx: fs.readFileSync('mykey.pfx'),
       passphrase: ********
  };
  
  var app = express();
  
  app.all('/*', function(req, res, next) {
    res.header("Access-Control-Allow-Origin", "*");
    res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS');
    res.header('Access-Control-Allow-Headers', 'Content-Type, Authorization, Content-Length, X-Requested-With, *');
    next();
  });
  
  var server = https.createServer(sslOptions, app);
  
  var io = socket.listen(server, {
      "log level" : 1,
      "match origin protocol" : true,
      "transports" : ['websocket', 'flashsocket'
     , 'xhr-polling'
     , 'jsonp-polling']
  });
  
  //No need to list all my socket events I guess
  
  server.listen(port);
  </code></pre>
  
  <p>Client code to connect to my Node server:</p>
  
  <pre><code>var socket = io.connect("https://www.*MYWEBSITE*.com", { secure: true, port: 8443});
  </code></pre>