title: How to fix missing an Intermediate/chain certificate in nodejs
body: <p>I have installed nodejs and ssl on my sever </p>
  
  <p>and my app.js code </p>
  
  <pre><code>var sslOptions = {
    key: fs.readFileSync('/etc/ssl/private/private.key'),
    cert: fs.readFileSync('/etc/ssl/certs/cert.com.crt'),
    requestCert: true,
    ca: fs.readFileSync('/etc/ssl/certs/ca.crt'),
    rejectUnauthorized: false 
  };
  
  var secureServer = https.createServer(sslOptions,app).listen(443, function(){
     console.log("Express server listening on port ");
  
  });
  </code></pre>
  
  <p>Now when i check </p>
  
  <p><strong><a href="https://www.sslshopper.com/" rel="noreferrer">https://www.sslshopper.com/</a></strong></p>
  
  <p>it is giving me error </p>
  
  <blockquote>
    <p>The certificate is not trusted in all web browsers. You may need to
    install an Intermediate/chain certificate to link it to a trusted root
    certificate. Learn more about this error. You can fix this by
    following Comodo's Certificate Installation Instructions for your
    server platform (use these instructions for InstantSSL). Pay attention
    to the parts about Intermediate certificates.</p>
  </blockquote>
  
  <p>Any idea ?</p>
  
  <p>How to fix this </p>