No compression of static HTML files (but everything else)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

No compression of static HTML files (but everything else)

Yves Goergen

I'm setting up a new server with Apache HTTPd on Ubuntu 20.04. I think I
have configured everything as usual but it just won't compress static
HTML pages. I does compress the directory index and PHP content (that
doesn't do anything else than a simple text output). All these pages
have the type text/html.

This is the .htaccess file of the directory:
AddOutputFilterByType DEFLATE text/html text/plain
I could add more types or text/html alone, and the usual IfModule
section, it doesn't help.

Firefox shows whether a page was compressed by the Content-Encoding
header in the F12 tools. It doesn't matter whether the connection is
secure (HTTPS) or not. The host is my local development hostname, not
localhost. The request comes from a local LAN address.

The deflate module is enabled. The only relevant part of the Apache
server config is this: (everything else is IP addresses, directories,
log files and SSL certificates)
<Directory "/var/www">
     Options Indexes SymLinksIfOwnerMatch
     AllowOverride AuthConfig FileInfo Indexes Limit

What can I do to find the problem? There's no output in the error log file.

Server version: Apache/2.4.41 (Ubuntu)
Server built:   2020-08-12T19:46:17


To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]