mod_deflate only supports the gzip encoding, but from what I can tell, .kmz files are Zip-encoded:
$ file test.gz
test.gz: gzip compressed data, was "test", from Unix, last modified: Thu Nov 5 10:38:11 2020
$ file test.kmz
test.kmz: Zip archive data, at least v2.0 to extract
So I think you need a different output filter:
ExtFilterDefine unzip-kmz \
intype=application/vnd.google-earth.kmz \
outtype=application/vnd.google-earth.kml+xml \
cmd=/usr/bin/gunzip
AddOutputFilter unzip-kmz kmz
Or more simply:
ExtFilterDefine gunzip cmd=/usr/bin/gunzip
AddOutputFilterByType gunzip application/vnd.google-earth.kmz
That might work, but it doesn't specify the output content type, so if Apache doesn't get that right, you'll need to use the first form.
Notes:
- gunzip will decompress Zip-encoded data, but you could also use unzip.
- Make sure that the
intype
and outtype
parameter values are the right content types for your system. grep '\.km[lz]' /etc/mime.types
will show you.