Can no longer serve gzip compression since update to Apache 2.4

Status
Not open for further replies.

mikelons

New Member
Messages
16
Reaction score
0
Points
1
Here is the code in my htaccess file that was working to compress all file types using the DEFLATE module. However since the update this no longer works, I have been googling how to get it to work for the past two hours with nothing working. Can you please provide me with a snippet of code that will enable compression? Looking to compress .svg, .html, .js, .css, .woff, .ttf, .otf, .eot. Domain if you need it www.mikelonsdale.co.uk

Code:
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript application/json image/svg+xml image/svgz+xml font/woff font/ttf
    <FilesMatch "\.(js|css|ttf|otf|eot|woff|font.css|svg|svgz)$" >
        SetOutputFilter DEFLATE
    </FilesMatch>
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    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:

    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI \.(?:swf|flv|pdf)$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI \.(?:avi|mov)$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI \.(?:mp3|mp4)$ no-gzip dont-vary

    Header append Vary User-Agent
</IfModule>
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
Hi,

We no longer support mod_deflate. All sites are currently cached using a Reverse Proxy setup with Varnish Cache, which would eliminate the need for any compression, as it's done automatically.
 

AngusThermopyle

Active Member
Messages
319
Reaction score
52
Points
28
Checking the response headers, the system does not seem to be serving gzip'ed content for his site.
It does for mine, which is on a different server (xo2)
 
Status
Not open for further replies.
Top