Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I got a problem on nginx 0.9.6 (centos) about gzip, when i use POST method, the gzip works, but but when i use GET method, it doesnt work. but for static css/js files are gziped for GET method, the tested page is text/html page, the nginx.conf:

gzip            on;
gzip_min_length 1k;
gzip_buffers    4 16k;
gzip_http_version 1.0;
gzip_comp_level 5;
gzip_types      text/plain text/css text/javascript application/x-javascript application/xml;
gzip_vary       on;
gzip_proxied    any;
gzip_disable    "msie6";

appreciated your help.

share|improve this question
What is it you're expecting to be gzipped, that isn't? –  Michael Hampton Oct 6 '12 at 23:55
i'm hoping both GOT and POST method, and all text files are gzip –  s20000 Oct 7 '12 at 1:01
Can you post a HTTP POST request which fails to be gzipped? Please include request and response headers. –  Adrian Heine Oct 17 '12 at 9:18

1 Answer 1

I'm not sure what is exactly your problem, but I have a hunch that adding application/javascript text/xml application/xml application/xml+rss text/javascript more mime types to be gzip could help. Try to look at the request headers your browser is sending to your server (i.e. with Web Inspector, Firebug etc.).

PS. Why do you use gzip_http_version 1.0; and not gzip_http_version 1.1;?

share|improve this answer
gzip_http_version shows starting which version of HTTP protocol gzip should be used. Not that http-1.0-only clients see that compression, but 1.0+. –  Alexander Oct 10 '12 at 21:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.