Phil Wareham
New Pleskian
Hi there, some of you might find this useful:
I have successfully enabled mod_deflate in Apache v2.x on my webserver and there do not seem to be any adverse affects on Plesk (so far!). For those who don't know mod_deflate compresses data before transmitting to compatible browsers, which then uncompress the data before displaying. On one of my site's homepage alone it saves 78% data bandwidth on a modern browser (Safari 3.1) so I'm pretty chuffed...
Original Size: 18 KB
Gzipped Size: 4 KB
Data Savings: 77.78%
Older browsers that do not support compressed data still get the uncompressed version so it is backwards compatible. You can test if your server already has mod_deflate enabled using the following tool...
http://www.whatsmyip.org/mod_gzip_test/
If you have Apache 2.x on your server then chances are you already have mod_deflate installed but not enabled. You can check by opening your Apache httpd.conf file and do a search for "LoadModule deflate_module modules/mod_deflate.so"
If it is there but commented out (has a # at the start of the line) then uncomment it.
Then add the following code to the bottom of your httpd.conf file:
<Location />
# Insert filter
SetOutputFilter DEFLATE
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
# 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:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</Location>
Restart Apache from the command line or within Plesk and all your hosted sites should now benefit.
Cheers,
Phil
I have successfully enabled mod_deflate in Apache v2.x on my webserver and there do not seem to be any adverse affects on Plesk (so far!). For those who don't know mod_deflate compresses data before transmitting to compatible browsers, which then uncompress the data before displaying. On one of my site's homepage alone it saves 78% data bandwidth on a modern browser (Safari 3.1) so I'm pretty chuffed...
Original Size: 18 KB
Gzipped Size: 4 KB
Data Savings: 77.78%
Older browsers that do not support compressed data still get the uncompressed version so it is backwards compatible. You can test if your server already has mod_deflate enabled using the following tool...
http://www.whatsmyip.org/mod_gzip_test/
If you have Apache 2.x on your server then chances are you already have mod_deflate installed but not enabled. You can check by opening your Apache httpd.conf file and do a search for "LoadModule deflate_module modules/mod_deflate.so"
If it is there but commented out (has a # at the start of the line) then uncomment it.
Then add the following code to the bottom of your httpd.conf file:
<Location />
# Insert filter
SetOutputFilter DEFLATE
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
# 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:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</Location>
Restart Apache from the command line or within Plesk and all your hosted sites should now benefit.
Cheers,
Phil