No matching certificate files to satisfy Node-Red https setup

Currently I have a registered domain and Apache on Debian running SSL.
My domain is accessible with https and works perfectly.
Node-Red still runs http and need to run https for security and compatibility as some php scripts (on https) need to interact with Node-Red (currently on http) and I am having problems with that.

I got 4 files from when I acquired SSL:
server.key, server.csr, certificate.crt and intermediate.crt

But settings.js requires:

    /** Option 1: static object */
    //https: {
    //  key: require("fs").readFileSync('privkey.pem'),
    //  cert: require("fs").readFileSync('cert.pem')
    //},

I have no privkey.pem and no cert.pem

What is the part Am I missing?
Thanks

Hello .. this stackoverflow article may better clarify the differences between the files and their extensions.

Difference between pem, crt, key files

I must admit im new to this security stuff but reading the above .. you can try the following

/** Option 1: static object */
    https: {
      key: require("fs").readFileSync('server.key'),
      cert: require("fs").readFileSync('certificate.crt')
    },

ps. you may need to use the absolute path to the files

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.