Server Fault Asked by nazanin on January 2, 2021
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.
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
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP