Finally got ghost to work. Several quick hints for installing ghost on CentOS 7, behind Nginx and using MySQL:

  • Don't use ghost-cli. It's meant for ubuntu, or local testing. Not suitable for CentOS in production. Very hard to tune.
  • If you consult docs from main-stream cloud vendors, they are old. Config file for ghost is no longer config.js in root directory, but default.json together with environment-specific confis in core/server/config.
  • Of course we want HTTPS, but setting it in ghost config can possibly cause redirect loop if the reverse proxy like nginx did the SSL part and strip it without notifying ghost. Use the HTTP header X-Forwarded-Proto to pass on the scheme so that ghost redirects no more.

Later I'll migrate most of my notes from Leanote.