January 20, 2009

VPS hosting, Drupal 6 and nginx

Filed under: General news — Tags: , , — Webopius @ 12:47 pm

I really must work on my post titles but how else can you describe it?

Webopius recently had an opportunity to try out a new VPS hosting provider (Slicehost) for a new site we’d recently completed – CotswoldNews. We normally stick to dedicated hosting but the performance of VPS systems has improved significantly over the years and Slicehost give you a ‘raw’ system with full root access to play with at a great price so we had to give it a go.

As Cotswold news was a Drupal based site it was also a chance to see how Drupal performed on a non Apache web server. We’d heard good things about nginx in terms of performance and memory use.

Related resources:


If you’ve ever looked for a hosting company, managed or otherwise, you’ll know there are hundreds out there all proclaiming to be the best. To make it more difficult, for every good customer review, you’ll find 3 others that are negative.

We did a LOT of research into VPS providers and settled on Slicehost because it was very hard (impossible?) to find a really bad review of them. They give you Tier-1 bandwidth, a choice of Linux operating systems, root access, 64 bit virtual slices, RAID-10 drives and capped machines so you are not sharing with hundreds of others.

After registration, we chose an Ubuntu Hardy distribution and within 2 minutes we received the machines IP address and login details.

You really do get a raw Linux install, so the next steps were to add users, manage security, install all the core applications and development tools.


Next step was the nginx install which at the basic level was a one line command. Easy. Not so easy was configuring PHP5 to run with fastcgi so that it would work with Drupal. If anyone wants a copy of our nginx configuration file and the method we used, just comment below.

Why nginx?

We chose nginx instead of Apache because we were looking for a lightweight, high performance web server with a minimal memory footprint. nginx is apparently the fourth most popular web server and it’s very fast and scaleable. As indicated above, the only downside was lack of support for fastcgi spawning.


Once we’d got nginx and php working the rest was simple. Standard Drupal install with a mysql database. Install of phpmyadmin and configuration of the nginx files to support Drupal redirect rules.

Slicehost DNS

Finally, we used the slicehost slice manager to create DNS records and an hour later after DNS propagation the site was up and running.

Initial impressions are that it is FAST and the site is working well even though it has some pretty complex sets of SQL queries to render the pages. You do need a strong Unix background to get the VPS set up but as Slicehost say themselves, it is geared towards developers. Very impressive though.

We will keep monitoring and report back in a month or so.

* Note: Webopius has no affiliation with Slicehost, nginx or Drupal – we just like them.

  • Tags