I made my own SSL certificate and built my own server using node’s https module, but what if wechat access did not respond?

  node.js, question

I have already made key.pem’ and cert.pem’ myself. Then use Mr Ruan Yifeng’s code directly:

var https = require('https');
 var fs = require('fs');
 
 var options = {
 key: fs.readFileSync('key.pem'),
 cert: fs.readFileSync('cert.pem')
 };
 
 var a = https.createServer(options, function (req, res) {
 res.writeHead(200);
 res.end("hello world\n");
 }).listen(8000);

As a result, all browsers cannot access it normally. Some browsers can continue to visit the page after asking. However, WeChat did not respond.

Excuse me, how can I make various browsers access my https page normally?
In particular, WeChat can normally access my https page?

Since the visa is not trusted, you need to use a trusted certificate.

Free certificates include:

  • StartSSL

  • Let’s Encrypt

  • WoSign (national certificate)

Low price certificate:

  • Comodo PositiveSSL

among themStartSSLAndComodo PositiveSSLIt is valid for one year.Let's EncryptIt is valid for 90 days, but supports automatic renew.
However, no matter which certificate you apply for, you need to have your own domain name.


In the free certificate, StartSSL has a long time limit, but the application is more complicated.
Let’s Encrypt application is relatively simple and can be passedacme_tinyThis little tool to apply, here isUse tutorial.
So is the WoSign certificate.One-year validity period(It has now supported a two-year validity period). The application process is in Chinese and is worth recommending.Click on this application