Ghost CMS operates on port 2368 by default so we need to create a reverse proxy that routes incoming traffic over both HTTP and HTTPS onto that port.
Additionally we need to point Caddy to the installation path of Ghost on our server.
In my case, let's say Ghost lives at:
/var/www/mytechblog
Then we need to create this Caddyfile. Don't forget that 'www' and '/' are not the same so I configured both rules:
techblog.com {
root * /var/www/techblog
file_server
reverse_proxy localhost:2368
}
www.techblog.com {
root * /var/www/techblog
file_server
reverse_proxy localhost:2368
}