After toying with the idea for a while I finally managed to switch my humble VPS from apache to lighttpd. The server had been having some strange choking episodes and I wasn’t able to find exactly what caused it, besides knowing it had to do with fastcgi processes bloating up and triggering the OOM killer. It was relatively sporadic, but since the VPS is pretty flimsy, I figured it was worth it to migrate and try to improve the performance a bit.
Plus I wanted to have this long overdue incursion into lighttpd-land more than I wanted to debug the problem…
I also took the opportunity to bust the only SVN code I had lying around (that nasty guck) and imported it to Git, so I could abandon mod_svn and didn’t have to setup a dedicated SVN server.
Migrating the normal sites running on the server was pretty straightforward, including WordPress (thanks to this clever idea to ditch the htaccess-based redirects), but it wasn’t perfect:
- I couldn’t make htdigest authentication work, but since it’s nothing serious I just left it unsolved for now.
- migrating Trac wasn’t a complete success. Got bitten by this bug which means I had to insert this hack to
keep it working like it used to:
UPDATE: actually no, that hadn’t fixed anything, but this did.
url.rewrite = ( "^/trac" => "$0", "^/(.*)" => "/trac/$1" )
Strangely enough lighttpd didn’t really have that big of an impact in the memory footprint. It might be that I just optimized Apache better and that with a bit more fine tuning it would really shine, but I guess I’m expecting a bit too much from the poor VPS.
Anyway, now that everything is set up and a few other tweaks are in place, I hope it’ll breathe a bit of life in the little guy.
UPDATE 2: apparently that clever 404 trick isn’t perfect. I just noticed it doesn’t receive the querystring, which caused my OpenId to stop working. I’ve put a workaround in place, but I must admit this migration wasn’t as smooth as it seemed at first.