Blog fixed again

It was pointed out to me that some requests on my blog returned RSS rather than HTML content. This was the result of an upgrade from Debian 6.0 "squeeze" to 7.0 "wheezy", which changed something so that content negotiation for PHP files was disabled.

I'm not sure what exactly changed; it's either the default in apache upstream, or something in a file that I hadn't modified and thus was replaced with the upgrade. At any rate, the fact was that I had configured mod_mime to have a line like

AddType application/rss+xml;qs=0.9 .rss

Which was sufficient, in squeeze, to tell apache not to prefer RSS files over their PHP variants. I found that in wheezy, the PHP mime type was not listed anywhere, which, combined with mod_negotiation's default setting of MultiviewsMatch NegotiatedOnly meant that the .php files weren't even being considered.

The short-term solution was thus to add a line for PHP files:

AddType application/x-httpd-php .php

An alternate solution would be to switch to MultiviewsMatch Any, but I'd recommend against that, for reasons explained in the documentation.

Of course, the long-term solution is to finally do that migration from blosxom-with-php-export to ikiwiki that I've been off and on contemplating ever since Joey announced he'd started working on ikiwiki. But, well, that's not for today.