Liebach v3.0 alpha

My Soekris Setup


This site is hosted on a Soekris net4801 “server” at home on an ADSL with a 768kb/s upstream.

I have installed OpenBSD 4.6 on it without doing anything special to avoid writing to the 4 GB Flash disk in it, except for a MFS /tmp and small /var/www/tmp used by Apache’s mod_gzip. I build packages and releases in VMWare Fusion on my Mac so I can update whenever there are patches, and of course upgrade to the latest release as soon as it gets tagged in CVS, which always happen a while before the release is avaiilable on FTP. Don’t do this if you’re not comfortable with OpenBSD and the way their releases work.

I’ve written some notes about OpenBSD on a Soekris.

The webserver is a plain vanilla OpenBSD Apache 1.3.something, it is forked from the Apache Project version quite a while ago, and last I heard the diff was measured in thousands of lines. It runs chroot’ed and with privilege separation, and have IPv6 support while still maintaining compatibility with third party modules of which I only use one: mod_gzip.

Compressing web pages to improve the user experience is a no-brainer on a slow uplink like mine, but serving real-time compressed content when the CPU is a 586-class 266 MHz job isn’t necessarily that fast, so I use the fact that I run a static site and compress the pages before I deploy them with a handy little deploy script to save the Soekris CPU. I then use content negotiation to serve all the resulting .html.gz files without extensions for pretty and clean URLs.

Unfortunately the Atom feed, the most popular file on the site, can’t be compressed since not all clients support Content-Encoding: x-gzip, and the same goes for the CSS files.

I plan to start using Juicer to minimize the size of the CSS and possiby the JavaScript I might start to use. It’s one of the nice things about preprocessing all pages, you can expend all the heavy lifting up front and make the job of the tiny server much easier.

For now the only JavaScript is my Google Analytics code that I’ve hacked a little so it’s only run if the domain name is not zentience.local, as that’s the name I access the local development server as, and I’m sometimes off-line when I do, and I don’t want to pollute my statistics which i easy to do with about one visitor per hour on a normal day…

I’d love to serve this from a server in a real dedicated hosting center, but I simply can’t justify the cost for a simple little site like this, so I think this is the cheapest possible way to host this. A Soekris net4801 doesn’t use much power, most of the time it’ll pull less than 5 W from what I’ve heard.

UPDATE on 2009-07-29:

I’ve disabled the compression as it turned out the latest version of Firefox couldn’t handle it, just showing the compressed data on Mac OS X. It worked fine on Windows where I tested because that was where I was most worried. I just assumed it would be fine in Firefox on non-Windows when it was fine in Windows.

Never assume. Test.

Sometimes I really hate browsers. They all suck somewhere, somehow, and you never know when or where it will hit you. Safari is still then one that lets me down the least, at least as long as I have the Saft plugin installed.

I haven’t looked for a solution yet, but if you know one please mention it in the comments. Thanks.

← Updated DesignImplanted Electronics →