Skip to content

How to Enable HTTPs

Muaz Khan edited this page Nov 28, 2018 · 1 revision

This wiki explains how to install and use HTTPs

First Step

Modify config.json to set isUseHTTPs:true:

{
   "isUseHTTPs": true
}

Second Step

Set valid certificate paths to sslKey and sslCert:

{
  "isUseHTTPs": "true",
  "sslKey": "/home/ssl/domain.key",
  "sslCert": "/home/ssl/domain.cert",
  "sslCabundle": ""
}

sslCabundle can be kept EMPTY. If you don't have .cabundle file then you must keep it empty.

If you do not have SSL keys/certificate

sudo -s
apt-get install software-properties-common
add-apt-repository ppa:certbot/certbot
apt-get update
apt-get install python-certbot-apache
certbot --apache
certbot renew --dry-run

Ref: https://certbot.eff.org/lets-encrypt/ubuntutrusty-apache

Now config.json looks like this:

{
  "isUseHTTPs": "true",
  "sslKey": "/etc/letsencrypt/live/domain.com/privkey.pem",
  "sslCert": "/etc/letsencrypt/live/domain.com/fullchain.pem",
  "sslCabundle": ""
}

Keep In Mind That

Do not remove any item from config.json. Only try to modify values. i.e. set true for isUseHTTPs etc.