title: Hosting multiple node.js sites with SSL
body: <p>We're looking into using node.js to host multiple websites on our web server.  Currently, we host everything in IIS, use domain names to differentiate websites, and use URL rewriting to go from HTTP to HTTPS.</p>
  
  <p>From what I've read, nginx seems to be the way to go for hosting multiple node applications on the same server: essentially nginx is the facade that all clients connect to and then it sends the requests to the various node processes depending on the host name.  </p>
  
  <p>But what I can't wrap my head around is the SSL part.  Node.js provides SSL capabilities, but so does nginx.  If nginx hosts the SSL certificate, and listens on 443, and forwards requests to various node.js applications, do the node.js applications also have to be running SSL certificates as well?  Is there any security loss by doing it that way?  Or is it better to run each node js application using https, and then do http to https inside the node.js application and pass-through all the way back up and out of nginx?</p>