500 Internal Server Error - Invalid command 'Header' in .htaccess

I'm getting in my server error log.

[Mon Jan 27 08:04:06 2014] [alert] [client x.x.x.x] /home/.../public_html/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration

And here is my simple .htaccess:

<IfModule mod_rewrite.c>
    Options -MultiViews
    php_flag display_startup_errors on
    php_flag display_errors on
    php_flag html_errors on
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^ silex.php/ [L]
</IfModule>

What could be wrong?


Solution 1:

It might be because mod_headers is not enabled. Try running a2enmod headers to enable the module.

Solution 2:

Enable header module using below command

sudo a2enmod headers

You have to restart your apache once you are done with enabling module

sudo service apache2 restart