MPWA Gateway | Multi Device Version | Latest : 8.x.x
Atur ssl ( HTTPS ) Khusus VPS
Atur ssl ( HTTPS ) Khusus VPS
*Jika anda install di hosting,silahkan tinggalkan bagian ini,khusus untuk yang install di vps
If you use vps then this script only runs if your website is HTTP,
To change to https please go to the server.js file, you will find the following code in the file
const http = require('http')
const server = http.createServer(app)
please change the code to this :
const https = require('https')
const server = https.createServer({
"key": fs.readFileSync("/arahkan/ke/file/key/ssl/anda"),
"cert": fs.readFileSync("/arahkan/ke/file/cert/ssl/anda"),
}, app);
If so, please restart the node js again.
NB: Each server has a different ssl file location, but usually if you use ubuntu the file is located in
/etc/letsencrypt/live/domain/privkey.pem
/etc/letsencrypt/live/domain/cert.pem