John Siu Blog

Tech - Business Tool, Personal Toys

H2Ghost - The Revamped Ghost HTTPS/2 Solution

☰ Table of Content

H2Ghost is a http2/https front end for Ghost Blog

It work either via proxy or using Ghost’s rootApp directly, providing an Node.js alternative to Nginx or Apache. It is a complete replacement of ghost-https-indexjs(discontinued) and Ghost Https Nodejs Proxy(renamed to this project).

It can be used as Ghost Blog start up wrapper.

Highlight

  • Single Node.js process for both H2Ghost and your Ghost instant (configurable).

  • HTTP to HTTPS redirect.

  • HTTPS primary URL redirect for site with multiple domain/sub-domain.

  • Minimum configuration.

4 - 6 lines if installing in same box with Ghost.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
const ghost = {
  start: 'app',
  env: 'production',
  dir: '/home/ghost/ghost',
  // ... no more change for rest of this section
}

const cert = {
  key: fs.readFileSync('server.key'),
  cert: fs.readFileSync('server.crt'),
  //ca: fs.readFileSync(''),
  //pfs: fs.readFileSync('')
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
const helmetOptions = {
  hidePoweredBy: true,
  ieNoOpen: true,
  noSniff: true,
  dnsPrefetchControl: false,
  noCache: false,
  xssFilter: false,
  //contentSecurityPolicy: {},
  //frameguard: {},
  //referrerPolicy: {},
  //hsts: {},
  //hpkp: {}
}

Full Instruction & Package

GitHub: H2Ghost

John Siu

Update: 2020-08-21
comments powered by Disqus