title: Can't Get SSL to Work With NodeJS
body: <p>I'm trying to setup a secure socket.io connection. I've setup a localhost apache server to run https on 443 but now I can't get the client-side socket.io to open a secure connection on port 9650.</p>
  
  <p>The server side code is simply:</p>
  
  <pre><code>this.socket = require("socket.io").listen(port);
  </code></pre>
  
  <p>And the clientside is simply:</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://localhost:9650/socket.io/socket.io.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>(https won't work here)</p>
  
  <pre><code>this.Socket = io.connect("https://localhost", {secure: true, port:9650});
  </code></pre>
  
  <p>io is defined so I can call connect but I get this error when I try to connect:</p>
  
  <pre><code>GET https://localhost:9650/socket.io/1/?t=1381630341479  socket.io.js:1659
  </code></pre>
  
  <p>I've tried variations on connect and can't find a working solution. Everything does work is secure is set to false but that's not what I'm looking for.</p>
  
  <p>This IS NOT an http node application. It's a general use application. It seems like everything I good favors http-type servers and I don't need that here.</p>