I decided to resurrect the blog this evening, after a mere 18 months of inactivity. I thought it would be a simple matter of fiddling with a few Apache configuration directives; as I should have expected, it turned into a heinous nightmare.
I originally settled on Rael Dornfest’s blosxom blogging software. It’s conceptually lovely, being both simple and flexible. Unfortunately, my original installation bit-rotted to an unmourned death after a server move, so I had to resurrect it.
My first hint that something was wrong came when I looked in my Apache server logs–the dreaded “Premature end of script headers”. Trying a Google search was barely helpful, dredging up endless web forums full of the clueless trying to help the desperate.
After much digging, I at least picked up the notion that Apache’s suexec facility might be a little bit culpable. This subsystem is responsible for securely executing CGI programs with reduced privileges, and is highly paranoid. The suexec log baffled me, though–it complained about a uid/gid mismatch, but I couldn’t see what was wrong.
Several years ago, when I was first setting up my network, I created a users group, and gave it a numeric ID of 1000. Red Hat introduced a group of the same name, but with a numeric ID of 100, a few years later. This wasn’t a problem until after I moved all of my files from my old server, where users had a gid of 1000, to my new server, which decided that it would create 50% of files and directories with gid 1000 (as served up by NIS), and 50% with gid 100 (as handed out by the /etc/group file). Which is where we get to tonight’s suspicious head-scratching over the suexec log.
More excitingly, the entries in the suexec log happened to character-wrap in my terminal window at, yes, exactly the point where it would be hardest to tell whether I was reading 100 or 1000, so I didn’t spot the mismatch for several minutes.
Oh, and did I mention that this was just one of tonight’s blog-configuration pleasures? I’m using Linux voluntarily; evidently, I chose to suffer.