Invalid command ‘Header’, perhaps misspelled or defined by a module not included in the server configuration

Written by on . Posted in Apache

root@linux:# service apache2 restart
 * Restarting web server apache2 [fail] *
The apache2 configtest failed. Output of config test was: AH00526: Syntax error on line XX of /etc/apache2/sites-enabled/site.conf: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration Action 'configtest' failed. The Apache error log may have more information.

Решение: необходимо подключить модуль headers

root@linux:# a2enmod headers
Enabling module headers.
To activate the new configuration, you need to run: 
service apache2 restart

И не забываем перегрузить apache

root@linux:# service apache2 restart 
* Restarting web server apache2            [ok]

Leave a comment