Tag: Apache error

  • Apache Invalid command Header

    On a new Debian server with Apache, web site give 500 internal server error.

    On checking error log, i found

    [Thu Jan 04 06:44:42.483932 2018] [core:alert] [pid 27583] [client 112.133.248.19:63020] /home/user/public_html/.htaccess: Invalid command ‘Header’, perhaps misspelled or defined by a module not included in the server configuration

    The error is due to Apache headers module not installed on the server.

    To fix, run

    a2enmod headers
    

    Restart Apache

    systemctl restart apache2
    

    Apache

  • Invalid command Header

    On a web site running Apache, i got following error in log file

    [Fri Jan 19 06:43:41.146643 2018] [core:alert] [pid 3536:tid 139697024132864] [client 112.133.229.111:50559] /home/site.com/public_html/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: https://site.com/

    This was Ubuntu server with Apache.

    Problem is due to Apache Headers module not enabled. Fixed by running

    a2enmod headers

    Restart Apache

    systemctl restart apache2

    See Apache