Okay, nevermind. I spent hours running test programs, reinstalling and recompiling things, tracing the problem down to its source, and finally realized that I had forgotten to restart Apache. I thought the APT script would have done that for me if needed, but oh well. It seems to work now.
It looks pretty neat. I was going to write my own weblog program in Perl, but I guess I won't have to now.