Apache Invalid command ‘Header’

I recently had a vagrant box which was giving a 500 internal error and when checking the Apache error log I found the following error:

/vagrant/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration

The problem is that headers module is not loaded in Apache so you need to load it and restart. SSH into your vagrant instance (or open a terminal if you’re having this problem on your local LAMP stack) and enable the module:

a2enmod headers

Then restart Apache

service apache2 restart

Leave a Reply

Your email address will not be published. Required fields are marked *