Enable mod_headers module in Apache

In Ubuntu Apache, the mod_headers module for using the RequestHeader directory is not enabled by default, so enable it.

sudo a2enmod headers

Please Restart Apache for the settings to take effect.

Please refer to the following articles for how to enable / disable Apache modules.

Apache error message when mod_headers does not exist

Example Apache error message when mod_headers does not exist.

Invalid command'RequestHeader', perhaps misspelled or defined by a module not included in the server configuration

Associated Information