Category Archives: Featured

Installing Multiple Ghost Blogs Behind NGINX on Ubuntu 12.04

Ghost LogoLooking to set up a blog with Ghost? While it still has a few rough edges and missing features at the time of this writing, as it’s essentially in beta at this point (hence the “0.3” versioning), it definitely shows promise as a blogging platform.

If you’re reading this, you’re probably aware that you can’t just FTP Ghost to a dinky shared host and expect it to run like your average PHP script. Ghost is a Node.js application, which works differently, and has yet to be adopted by services that generally cater to newbies. You’re going to need a VPS and command line access. I’m also going to assume a rudimentary knowledge of Linux commands. (You can pick up the basics pretty easily at linuxcommand.org if need be.)

This tutorial aims to walk you through the process of installing one ore more instances of Ghost behind the NGINX server. NGINX is a fast and lightweight web server that, when configured in this manner, acts as a proxy, forwarding requests to the correct Ghost blog.

DigitalOcean

I’m a big fan of DigitalOcean. I’ve been hosting my various web sites with them since this June, and their service has been of excellent quality. In addition to their rock-bottom price, their virtual machines have performed well and their staff has been competent and helpful. (You can find my review of DigitalOcean here.)

$5/month will get you a “Droplet” with 512MB of RAM, 20GB of storage on a solid state drive and plenty of data transfer. (It’s a soft cap with reasonable overages. You’re very, very unlikely to ever reach it, though. Unless you’re a popular podcaster or something, in which case you should be looking into a CDN…)

The figure that’s the most important is the RAM. Just like with the computer you’re using to read this, active applications reside in the system’s memory, and the amount they use varies depending on what the app is doing. Ghost, in my informal tests, doesn’t seem to be too memory-intense. So a 512MB Droplet could probably host a few Ghost blogs at once, depending on their popularity and how the system is configured.

There are plenty of options for a VPS, though. If you’re not too keen on DigitalOcean, Linode, Rackspace, Amazon EC2 and RamNode are popular. If you want to give DigitalOcean a try, you can sign up with the promo code DIVEIN5 to get a $5 credit. You can also pay by the hour if you just want to fire up a VM for a few hours to experiment before making a decision.

Initial Setup

Once you’ve got your VPS, it’s time to start setting things up. For simplicity, I will assume you are running Ubuntu 12.04. You can follow along with any Linux distribution on any hosting provider, but some commands may be a little different.

First, if you haven’t already, use SSH to log in to your VM as root, using the password your host gave you. Take this opportunity to change your password to something different, and reasonably strong, for security. Just run the passwd command and follow the on-screen instructions.

Now let the system update its package index by running the following command:

apt-get update

While you’re at it, install the unzip tool so you can unpack the Ghost archive later on.

apt-get install unzip

Continue reading →

Solar Theme for Ghost Blogs

Need a stylish new design for your Ghost blog? Looking for something that puts your content first, with an emphasis on reducing eye strain? Allow me to introduce my new theme (which is technically a port of the one I made for Jekyll), based…

Ghost: The New Blogging Platform, and Why it Matters

Ghost is a new blogging platform that aims to do one thing and do it well: blogging. Its developers want to recapture the spirit of blogging that was present in the earlier days, when it was all about writing and publishing long-form content. A…

Finding a Website’s Favicon with Ruby

For a project I’ve been working on, I wanted to to have my Sidekiq worker (which is part of an RSS crawler) discover the favicon for a web site and cache it for later display. It was fun figuring out a way to do…

Setting Up a LESS Workflow in Sublime Text

LESS has been a popular way to streamline your CSS-writing for a while now, but fitting it into your workflow isn’t always easy. Some designers use standalone applications like CodeKit or SimpLESS to compile their LESS files into browser-ready CSS, but I prefer a…

Solar: A Jekyll Theme Based on the Solarized Color Palette

I’ve been having fun playing around with Jekyll and Ruby lately, which has lead to a sudden increase in the number of repositories on my GitHub profile. After converting my personal blog and porting its theme over, I thought it would be fun to…

DigitalOcean Review

Since the beginning of April, this site has been hosted by DigitalOcean. I’ve been a longtime customer of VPS.net—from September of 2009 up until April of 2012—but the difference in service was so huge that I had to switch. While VPS.net was a good…

Using the WordPress 3.5 Media Uploader in Your Plugin or Theme

Back in 2010, I wrote a post on Using the WordPress Uploader in Your Plugin or Theme that went on to be one of my most popular tutorials of all time. Then the WordPress team went and added a much cooler media uploader in…

Post to Twitter From a PHP Script: 2013 Edition

Back in 2009, I wrote a post on how to write a simple PHP script to call on the Twitter API and update your status. Despite its popularity, the information hasn’t been relevant in some time. (Things certainly have changed since then!) The Twitter…

Best of 2012

Today Webmaster-Source enters its seventh year. Historically I have done a quick roundup of some of the more interesting posts from the previous year, and I intend to continue with that tradition going into the new year. So, without further ado, let us recap.…