Setting this all up
Sometimes the internet throws up something interesting like a new blogging engine called Ghost and I just have try it.
This is set on my own server and this is how I did it. All the information is out there on the web - you just have find it and do it all in the right order.
http://support.ghost.org/installation/
I run an Ubuntu 12.04 server and so download and installation was pretty straight forward: download the zip into my web root and extract to a new folder.
http://support.ghost.org/config/
Then the basics of configuration to get things up and running: URL, mail, database, server details.
https://ghost.org/forum/installation/529-use-local-smtp-server-for-sending-email/
http://support.ghost.org/mail/
I run my own mail server so I wanted to use that. The details in the post above solved my problem and now the system can send me a reminder email if I forget my password.
http://www.servermom.org/ghost-nodejs-varnish-cache/1256/
My server uses Varnish cache in front of the web servers to speed things up a bit so there was some fiddling to get things working here.
I had to add a new backend to my Varnish configuration file using the Ghost server details:
backend ghost { .host = "127.0.0.1"; .port = "2368"; } sub vcl_recv { if (req.http.host ~ "ghost.mixedbredie.net") { set req.backend = ghost; } if (!(req.url ~ "ghost")) { unset req.http.cookie; } } sub vcl_fetch { if (req.http.host ~ "ghost.mixedbredie.net") { set req.backend = ghost; } if (!(req.url ~ "ghost")) { unset req.http.cookie; } }
Start Ghost and restart Varnish and it works.
http://support.ghost.org/deploying-ghost/#init-script
So, once it worked running from the shell and passing through the Varnish cache successfully I needed a way to make sure it stayed up, restarted and started on reboot. The good folk have already thought of that and the init script works a treat.
service ghost start
service ghost stop
service ghost restart
service ghost status