3

I am running apache with mod_pagespeed on fedora (14), and I am getting the error message:

[error] an unknown filter was not added: DEFLATE

a lot. I know this is because mod_deflate is not loaded, but that's good, I don't want to load it (the load balancer takes care of gzipping etc, and we get unexpected results when deflate is on the webservers too)

However I can't figure out where it is being referenced, I have used this command to look through all files in /etc/httpd

 find . -type f -exec grep -li "deflate" {} \;

update that command also searches through the conf.d subdir - and I used a similar thing to look through all the .htaccess files on the server

 find . -type f -name ".htaccess" -exec grep -li "deflate" {} \;

and the only references are in .conf files and they are commented out with # (apache has been restarted) update for example

# LoadModule deflate_module modules/mod_deflate.so

How can I find where it is being referenced and remove it?

update I have tried to run a2enmod and a2dismod, but there are not such commands. yum install a2dismod does not find anything to install. The names of those commands and the /etc/apache2/mods-enabled directory I have only come across with ubuntu, I don't know the equivalent fedora / fedora-installed-via-yum commands

the installed modules list, (but since the error is that the filter is unknown, I am not sure what I am looking for? If mod_deflate was in this list then surely I wouldn't get the error?)

Loaded Modules:
core_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
auth_basic_module (shared)
auth_digest_module (shared)
authn_file_module (shared)
authn_alias_module (shared)
authn_anon_module (shared)
authn_dbm_module (shared)
authn_default_module (shared)
authz_host_module (shared)
authz_user_module (shared)
authz_owner_module (shared)
authz_groupfile_module (shared)
authz_dbm_module (shared)
authz_default_module (shared)
ldap_module (shared)
authnz_ldap_module (shared)
include_module (shared)
log_config_module (shared)
logio_module (shared)
env_module (shared)
ext_filter_module (shared)
mime_magic_module (shared)
expires_module (shared)
headers_module (shared)
usertrack_module (shared)
setenvif_module (shared)
mime_module (shared)
dav_module (shared)
status_module (shared)
autoindex_module (shared)
info_module (shared)
dav_fs_module (shared)
vhost_alias_module (shared)
negotiation_module (shared)
dir_module (shared)
actions_module (shared)
speling_module (shared)
userdir_module (shared)
alias_module (shared)
substitute_module (shared)
rewrite_module (shared)
proxy_module (shared)
proxy_balancer_module (shared)
proxy_ftp_module (shared)
proxy_http_module (shared)
proxy_ajp_module (shared)
proxy_connect_module (shared)
cache_module (shared)
suexec_module (shared)
disk_cache_module (shared)
cgi_module (shared)
version_module (shared)
cband_module (shared)
dnssd_module (shared)
pagespeed_module (shared)
perl_module (shared)
php5_module (shared)
python_module (shared)
ssl_module (shared)
CodeMonkey
  • 173
  • 1
  • 2
  • 7

3 Answers3

2

The error message you get actually means your current apache configuration needs mod-deflate to be loaded. Your apache wants to use mod-deflate as a processing filter, either an outgoing filter or an incoming filter.

See the apache documentation about filters.

As you don't want to use mod-deflate you have disabled it and the output of DUMP_MODULES doesn't show it. You now need to look for filter instructions that make use of mod-deflate and de-activate them. Looking for the keyword DEFLATE is a good start but also look for INFLATE (mod-deflate is also used to decompress incoming response body). And, if you don't find anything, even looking for Filter may help (but then you'll probably get a longer list of matches). Try out commands like:

grep -r Filter /etc/apache2/*
find /var/www -type f -name .htaccess -exec grep Filter {} \;

You might also need to look for other included files as some packages (some web applications like phpmyadmin and others) usually install apache configuration directives under different directories (at least this is the case with some Debian/Ubuntu packages, not sure with Fedora).

You could also completely deactivate the filter module (mod-filter) and the mime module (mod-mime, which defines the Add/RemoveFilter directives) but that will de-activate other functionalities you probably need.

Lætitia
  • 2,085
  • 22
  • 33
  • +1 for your effort, but I can't find any more references to deflate, daren't deactivate other modules on a live server can can't recreate on my dev box :( – CodeMonkey Jul 02 '13 at 12:25
1

Which version of Fedora are you using?

You not only need to look for the deflate word but also need to look for include statements in your apache configuration files. Most linux distros automatically include all files from a directory such as /etc/apache2/conf.d/ into their apache configuration. It might be your case.

Your distribution probably includes the a2enmod and a2dismod apache utilities that helps to manage apache modules. Those utilities usually only manage links in the /etc/apache2/mods-enabled directories which are then included as I said above. Try to use these commands to manage the list of modules your apache is using.

Lætitia
  • 2,085
  • 22
  • 33
1

Check htaccess files for something like

AddOutputFilterByType DEFLATE text/plain
Peca
  • 111
  • 5