0

I have the following gzip configuration at the nginx.conf file:

    gzip on;
    gzip_disable "msie6";
    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 6;
    gzip_buffers 16 8k;
    gzip_http_version 1.1;
    gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

and the problem is that it is compressing tar.gz archives but I don't understand why since their mime-type is application/x-gzip.

How could I possible fix this without fulling remove the gzip? Thanks!

  • Why do you believe that nginx is compressing the file? – Michael Hampton Nov 2 '16 at 0:20
  • @MichaelHampton because when I download it I have to extract it 3 times instead of two. (7z x foo.tar.gz, 7z x foo.tar, 7z x foo) – user236479 Nov 2 '16 at 0:26
  • And what's in the file? Isn't that how it was originally packed? – Michael Hampton Nov 2 '16 at 1:13
  • @MichaelHampton just text and python files. The tar.gz packages are created using normal GNU/Linux tools, and when I remove those lines from the nginx.conf file, I can correctly download the tar.gz packages and decompress them! – user236479 Nov 2 '16 at 2:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy