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 02 '16 at 00: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`) –  Nov 02 '16 at 00:26
  • And what's in the file? Isn't that how it was originally packed? – Michael Hampton Nov 02 '16 at 01: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! –  Nov 02 '16 at 02:24

0 Answers0