diff --git a/.gitignore b/.gitignore index dfc4856..b5c50ef 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ outputDir/ client/package-lock.json package-lock.json public/img/.tinypng-sigs +acme/ diff --git a/bin/www b/bin/www index 853b979..ff34f07 100644 --- a/bin/www +++ b/bin/www @@ -10,10 +10,14 @@ var http = require("http"); var fs = require("fs"); var https = require("https"); +const key = fs.readFileSync('./acme/etc/live/palmpay.io/privkey.pem', 'utf8'); +const cert = fs.readFileSync('./acme/etc/live/palmpay.io/cert.pem', 'utf8'); +const ca = fs.readFileSync('./acme/etc/live/palmpay.io/chain.pem', 'utf8'); + var ssl_options = { - key: fs.readFileSync('./acme/etc/live/palmpay.io/privkey.pem'), - cert: fs.readFileSync('./acme/etc/live/palmpay.io/cert.pem'), - ca: fs.readFileSync('./acme/etc/live/palmpay.io/fullchain.pem') + key: key, + cert: cert, + ca: ca }; /** diff --git a/generatessl b/generatessl index fa6282a..38dedd4 100644 --- a/generatessl +++ b/generatessl @@ -1,3 +1,8 @@ #!/bin/bash +echo "Generating SSL..." cd /root/website -greenlock certonly --webroot-path public --acme-version draft-11 --acme-url https://acme-v02.api.letsencrypt.org/dit.org/directory --agree-tos --email --domains <--domains palmpay.io,palmpay.io <--- example> --community-member --config-dir ./acme/etc \ No newline at end of file +greenlock certonly --webroot-path public \ + --acme-version draft-11 --acme-url https://acme-v02.api.letsencrypt.org/directory \ + --agree-tos --email --domains < --domains palmpay.io,www.palmpay.io <- example > \ + --community-member \ + --config-dir ./acme/etc \ No newline at end of file