RetroCode UK

Published Date Mar 17, 2012 Reading Time ~3 minutes RSS Feed Gadgets Web Development

PC-Fit2 Web Server

I’m now running a test web server on a PC-Fit2 which is the coolest little PC.  It’s got the same footprint as a coffee mug coaster, and is just a couple of centimetres high.

On it, I’m using Ubuntu server with Apache2 and Webmin.  Webmin also takes a lot of the effort out of configuring your website server, and I used ProtFTP to allow me to add users and lock them into their home folders and changed their default group to “www-data”.  This also makes it easier to set-up new sites, and manage them.  I’m using Mercurial, and have also installed it on the web server, although I haven’t quite got to the stage of using it to publish changes.  Theoretically I could also use BitBucket to backup my own development files.

I also found a nice HTML5 base template that I’ve used as a basis for a home page for the webserver, that points to the webmin administration key areas, and also links to the main websites that I’m working on - both testing and live versions.

Before using this set-up I’d been using either a local LAMP server or a VirtualBox image.  Both these worked well, but they have their own limitations.  Having a LAMP (or WAMP) server has an overhead on your own PC, and it also is reliant on your own PC not changing.  So if you buy a new laptop or something, then you have to set it all up again.  Having a virtual image running solves this problem, but it has an overhead of its own, and especially if you’re working on the same PC as your virtualisation host, then it uses quite a few resources.

By having a dedicated (silent and efficient) web server, makes such a difference.  It’s so much quicker than the other options, and it also can be configured to be almost exactly like your live site.  The only caveat is that by using virtual hosts, I also need to set-up my hosts file to point my client PC to the right place.  However, I’m sure that there’s also a way to set-up a local DNS server… but that’s for another day, and certainly not necessary.

One other huge benefit of the set-up I have now, is that I can take my server to and from work.  This means that I can be testing directly on a site I’m working on, and do the same from home without complicated set-ups, or it taking a long time to copy files from one system to another.

One thing that I might fancy trying in the future, would be to have a virtualised server that I can have different images running on it.  However, although the PC-Fit2 model I have does support hardware accelerated virtualisation, I don’t think it has enough memory or processing to handle that really effectively.  Virtualisation does, however, allow for much easier back-ups and also allows you to experiment with different set-ups, or have servers configured slightly differently that you can easily swap between.

Anyway, I’m still also going to be experimenting a little with Yii among other things… at least when I get back from Japan, and have some spare time!  And assuming that I haven’t got a Raspberry Pi to play with!