Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
Par PlaceOweb le samedi, octobre 17 2015, 18:37 - Système - Lien permanent
[core:alert] /var/www/mywebsite/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
To simply solve this problem, use the following two commands for add the required and currently missing Apache module:
- a2enmod headers # Enabling headers Module
- apache2ctl restart # Restarting Apache
/var/www/mywebsite/.htaccess:
<FilesMatch ".+"> ForceType application/octet-stream Header set Content-Disposition attachment </FilesMatch>
root@ks:~# a2en a2enconf a2enmod a2ensite root@ks:~# a2enmod headers Enabling module headers. To activate the new configuration, you need to run: service apache2 restart root@ks:~# apache2ctl configtest Syntax OK root@ks:~# apache2ctl restart root@ks:~# l /etc/apache2/mods-enabled/ ... headers.load -> ../mods-available/headers.load ...