This blog had been shut down for a few days and I wasn't aware of it. Turned out it had very common Nginx 502 error for quite a time.

There are so many problems that ends with 502 error. It is quite hard to figure out what exactly is the problem. But thankfully, ghost has an amazing doctor tool.

cd /var/www/ghost
ghost doctor

Simply run ghost doctor command in your ghost blog directory. It will automatically show you what is wrong with your ghost instance. In my case, it was that I messed up the chown command and changed owner of the ghost directory.