Ever since I got my Model B Raspberry Pi board a few weeks ago, I wanted to use it as an inexpensive web server. So here it is. In fact, you are reading this very post delivered straight from my Pi.
I used the latest Raspbian image (Debian Wheezy/Testing), and installed lighttpd 1.4.31, php 5.4.4 and mysql 5.5.24 straight from the Debian repositories. Linking up lighttpd with the PHP interpreter using FastCGI was very simple:
sudo apt-get install php5-common php5-cgi php5 php5-mysql
sudo lighty-enable-mod fastcgi-php
Then, I followed the steps outlined in this answer on Server Fault to set up a named vhost in lighttpd. There were other methods on various websites regarding mod_simple_vhost but since I didn’t need a dynamic setup based on the name of each virtual host, a simpler setup like the example in the Server Fault answer worked for me.
After that, I followed the regular WordPress installation procedure. Who knew $35 could get you a decent web server?
Initially, I had concerns about the performance of the Pi and whether it would be able to take up the load of a full WordPress website with MySQL and all. While obviously you wouldn’t want to run a high-traffic website on low-performance hardware like this , it does the job for any very-low-traffic web site, and I’m quite surprised at how much performance it can deliver for the amount of power it consumes.
So there you have it. I’ll be running this blog on the Pi for the next few weeks. Let’s see how it goes; it’s going to be a hell of an experiment. Or, probably a very good idea.