Hello Friends 👋,

Welcome To Infinitbility! ❤️

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

This tutorial will have to solve Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration Action 'configtest' failed apache issue getting.

When you added new header and try to restart your apache server but now your server not starting and getting error.

But when you try sudo apache2 configtest command and get something like below error.

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.

When we add first any new header then first we have to enable headers module and it’s achieve by below command

sudo a2enmod headers

After enable headers module try apache2 restart command

sudo service apache2 restart 

Thanks For Reading…