I am enabling http gzipping on Apache 2.2.9-10+lenny7 I included the following Apache directives in my /etc/apache2/apache2.conf
<Location />
# Insert filter
SetOutputFilter DEFLATE
# Netscape 4.x has some problems…BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
# BrowserMatch bMSIE !no-gzip !gzip-only-text/html
# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won’t work. You can use the following
# workaround to get the desired effect:
BrowserMatch bMSI[E] !no-gzip !gzip-only-text/html
# Don’t compress images
SetEnvIfNoCase Request_URI
.(?:gif|jpe?g|png)$ no-gzip dont-vary
# Make sure proxies don’t deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</Location>
Then I tried restsarting the Apache Webserver:
debian-server:~# /etc/init.d/apache2 restart
Syntax error on line 56 of /etc/apache2/apache2.conf:
and I ended up with the following error:
Invalid command ‘Header’, perhaps misspelled or defined by a module not included in the server configuration
A quick look through my Apache module configurations and consultation with Google shown I’m missing the mod_deflate module along my Apache server loaded modules.
To enable the module to resolve the error issue:
Invalid command ‘Header’, perhaps misspelled or defined by a module not included in the server configuration all I did was:
debian-server:~# ln -sf /etc/apache2/mods-available/headers.load /etc/apache2/mods-enabled/headers.load
Then I restarted the Apache:
debian-server:~# /etc/init.d/apache2 restart
Hooray now html content passed from the Apache webserver to the end users is transferred in a gzip format ! 🙂
More helpful Articles
Tags: Fix "Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration" on Debian Squeeze Apache 2.2
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3) Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3 (.NET CLR 3.5.30729)
Rather than creating the links yourself, you can use a2enmod:
View CommentView Commentsudo a2enmod headers
sudo apache2ctl graceful
Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Safari/531.2+ Debian/squeeze/sid () Epiphany/2.29.92
Thanks, I know that but actually I prefer linking them manually 🙂
View CommentView CommentMozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; fr; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10
saved my life, thanks !!!
View CommentView CommentMozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Thats great, its work well…
I fixit the problem with mod_rewrite. i wanted to output whitout the fragment index.php in seo-url-friendly.
The error 500 looks than…this tutorial fixed the problem.
View CommentView CommentMozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/531.2+ Debian/squeeze (2.30.6-1) Epiphany/2.30.6
Thanks Tilo,
I’m happy I was able to help to somebody out there.
Best!
View CommentView CommentGeorgi
Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.71 Safari/534.24
it works
View CommentView Commentthank you very much for the brilliant work:)
Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/531.2+ Debian/squeeze (2.30.6-1) Epiphany/2.30.6
you’re welcome 🙂
View CommentView CommentMozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20100101 Firefox/6.0.2
In my experience, this message does not result from a missing mod_deflate module; it results from a missing mod_headers module.
For those of you who continue to receive this message after enabling mod_deflate, try enabling mod_headers.
See: http://littletechthoughts.blogspot.com/2009/02/invalid-command-header-perhaps.html
View CommentView Comment