title: Generating an SSL Key to work with node.js
body: <p>I'm working to setup a SSL via GoDaddy to use with my node.js server on AWS EC2. I've been unable to get it to work. </p>
  
  <p>Here's what I've tried:</p>
  
  <p>Intended for the domain: files.mysite.com</p>
  
  <p><strong>On the server I run:</strong></p>
  
  <pre><code>$ openssl req -new -newkey rsa:2048 -nodes -keyout files.mysite.key -out files.mysite.csr
  
  Common Name: files.mysite.com
  password: left empty
  </code></pre>
  
  <p>I then get the CSR: vim files.mysite.csr</p>
  
  <p>I copy and paste from:</p>
  
  <pre><code>-----BEGIN CERTIFICATE-----
  ......... lots of stuff
  -----END CERTIFICATE-----
  </code></pre>
  
  <p>There is an extra empty line at the end, which I leave and paste into the GoDaddy interface using rekey.</p>
  
  <p>I then download the godaddy key which provides:</p>
  
  <pre><code>gd_bundle.crt
  files.mysite.com.crt
  </code></pre>
  
  <p>Then in node I insert: </p>
  
  <pre><code>key: fs.readFileSync('server.key').toString(),
  cert: fs.readFileSync('server.crt').toString()
  </code></pre>
  
  <p>I'm not sure what server.key is or server.crt given that GoDaddy provides two crt files?<br>
  Can you help? </p>