How do I get Apache2 to parse (without error) Header directives in a .htaccess?

Solution 1:

With apache2, just run a2enmod headers and then sudo service apache2 restart and it will install the headers module automatically.

Solution 2:

You'll need to add a line like:

LoadModule headers_module modules/mod_headers.so

To your httpd.conf to add support for that. In Ubuntu and similar, you can do a2enmod headers and it'll automatically enable it in your configuration.