I seem to have had a weekend of breaking things on my Linode server. One of the things you need to do regularly if you have a virtual server like those on Linode is to keep the software up to date. I run ArchLinux on Linode, and it’s pretty easy to keep it updated by running
pacman -Syu every month or so. It must be pretty fool-proof, because this is actually the first time in about 18 months of running the server that I’ve broken something, but it was a pretty big something.
Apache — the webserver I use to run all my sites — was updated, and apparently included some changes to the configuration which are not backwards compatible with the old configuration. That meant that I gaily updated, reloaded Apache and found that it failed to start. All my sites were completely dead. Oops. What followed was a fairly frantic morning and afternoon of trying to find information about what I needed to change, but nothing I tried seemed to bring Apache back to life again. After some time of this, with no indication that things were getting less broken, burning it down and starting afresh with something else started to look like an attractive option.
I had considered installing nginx for a while. It’s an alternative webserver that’s supposed to be lighter and a bit faster than Apache for many situations. It uses fewer resources than Apache, and while my Linode is more powerful than I need it to be, running lean is always attractive. I installed nginx, and was surprised to find that it was pretty easy to replicate most of my old setup. This blog was the easiest because it’s a static site just running HTML. Simple sites using PHP were also fairly easy, but I came a bit unstuck with my photoblog running on Koken. I think one of the issues is that Koken relies on quite extensive
.htaccess rules and rewrites to direct requests to the application and rewrite URIs. You can do rewrites in nginx configurations, but since I’m such a beginner with it, I’m not really sure where to start. After a lot of rather random tinkering, it’s basically working, but there’s a stray
index.php? in the URIs. I don’t seem able to use the Lightroom plugin to import images, and something very weird has happened to thumbnail generation. The images that Koken generates look really weird and blown out, though the originals (where they are displayed) are fine. I’ll have to see what I can do to fix that with some help.
I can’t say that it was the restful weekend I was hoping for, but I seem to have got things mostly back on track. Anyway, hopefully this post will explain what was going on if you found the site down yesterday. If you notice that anything else is broken or behaving oddly, do let me know.