I got the following error for one of the Magento e-commerce website:
Invalid command ‘Header’, perhaps misspelled or defined by a module not included in the server configuration
After googling it was found that the related headers module was not enabled in Apache.
I was able to fix the issue simply by following two commands:
1. Enabling headers Module
ln -sf /etc/apache2/mods-available/headers.load /etc/apache2/mods-enabled/headers.load
2. Restarting Apache
/etc/init.d/apache2 restart
Note: Above commands were run from Ubuntu 10.04.2 server
Hope this’s helpful.
Cheers
There is also a2enmod and a2dismod to make your life a little easier 😉
I just encountered this issue on a new ubuntu 12.10 server I provisioned, but I used sudo a2enmod headers instead.
However, I’m wondering why this is even required.
I’ve had ubuntu 10.10 server running for almost 2 years now where headers is NOT enabled and my 1.4.20 site and various newer test beds have been running fine.
I just provisioned a new test bed running ubuntu 12.10 and configured it identical to my other server, except now I was getting this headers error. Why would headers be required now when it was not previously. I’m dealing with the same copy of a magento store on both servers.
Why
Thanks a lots, this helps!
enable ‘headers_module’ in Apache