AnswerBun.com

compression mod_deflate is not working on apache2

I have two websites on my apache server. I have already enabled mod headers and deflates. in /etc/apache2/mod-available/deflate.conf i have written:

<IfModule mod_deflate.c>

SetOutputFilter DEFLATE
DeflateCompressionLevel 9


AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript


BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html

DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio

LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate

Header append Vary User-Agent env=!dont-vary


</IfModule>

but each time i check my website through the different commpression test the result is always: Compression status: Uncompressed

i tried to insert the code in /etc/apache2/site-available/mysite.com but it doesnt work. Have i missed something? I would be really gratefull if anyone can help.

Server Fault Asked by nazanin on January 2, 2021

1 Answers

One Answer

can you try adding in your v-host configuration, just for testing this:

<Location /tempFolder/>
        SetOutputFilter DEFLATE
</Location>

restart apache and see if the responses get gziped - eg by:

wget --header "Accept-encoding: gzip" http://host.name/tempFolder/file.txt

if compression works - you should get file.txt that can be unpacked with gunzip.

maybe the mod_deflate is not loaded after all?

Answered by pQd on January 2, 2021

Add your own answers!

Related Questions

listen unix /tmp/plugin155583172: bind: input/output error

1  Asked on January 4, 2021 by jamiet

 

Are network bridges still in use today?

1  Asked on January 4, 2021 by jeanny

 

.ftpaccess file and Pure-FTPD

1  Asked on January 4, 2021 by torein

 

Multiple VHosts with FastCGI and Suexec

1  Asked on January 3, 2021 by bountiful

         

TCP Window Size

0  Asked on January 3, 2021 by loneknight

   

ECS Container Mount Mode Z or “”

0  Asked on January 3, 2021 by roman-newaza

   

NGINX deny all except websockets for Flask app

0  Asked on January 1, 2021 by igniter

       

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved.