How to install mod_headers

Solution 1:

I'm taking a leap of faith assuming you are talking about a Debian/Ubuntu server here, as Redhat/Fedora/Centos have it installed and enabled as part of the default httpd installation.

On Debian/Ubuntu, you can enable mod_headers (it should be already installed as part of the apache2 installation), by running:

a2enmod headers
apache2 -k graceful

Solution 2:

Here's to all those who got here, wanting to find out how to install mod_headers on WAMP / WAMPSERVER:

Since the list of available Apache modules doesn't have the "mod_"-prefix, you'll find it as "headers" in the Apache > Apache modules flyout menu.

And if you can't edit there, edit the wamp\bin\apache\apache\conf\httpd.conf file and comment or uncomment the line with "LoadModule mod_headers" at the beginning.

And in case WAMPSERVER / Apache doesn't start / restart following your changes (and the Apache error log has no entries), try starting the HTTP Deamon manually with wamp\bin\apache\apache\bin\httpd.exe - while this is no way to start Apache in WAMP during normal use (because that way it cannot find some libraries), this will help you debug and give you error messages on any errors in the configuration (which are attempted to be loaded before any libraries).

Tags:

Apache 2.2