Nginx – Help me enable gzip compression on nginx

gzipnginx

Here's the gzip section from my current nginx.conf:

gzip  on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types text/plain text/html text/css application/json application/x-javascript text/xml;
gzip_buffers 16 8k;
#gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_min_length  1100;

I'm testing by downloading a 14KB html file and checking the headers with the httpfox plugin for FireFox / analyzing the page with the PageSpeed plugin, and I've also tried http://www.gidnetwork.com/tools/gzip-test.php.

I believe the gzip module is installed correctly, because I was able to get a single "Yes" from the gid tester when I changed the gzip_http_version to 1.0, but httpfox and PageSpeed always tell me that the file is not compressed.

I've tried lots of different combinations here and can't seem to get it to work.

Installation and server details: I'm on a server at WebFaction, and nginx was installed as part of a custom script application (Ruby) that I installed some months ago.

Update:
On the other hand, the test at this URL tells me that compression is working correctly:
http://nontroppo.org/tools/gziptest/

Could it be that the other tools are simply reporting this incorrectly?

Best Answer

I've got more confidence in redbot for resource checking.

Since the usage of gzip depends on a lot of factors, it's probably best to check with a real environment (real browser/proxy/etc) and monitor the result using a network-analyzer (wireshark)