I tried adding these lines to mime.types:
application/x-gtar tar.gz tgz tar.bz2 tbz2 tbz;
application/x-bzip2 bz2;
application/x-gzip gz;
But nginx reports "Content-Type: application/x-bzip2" for a tar.bz2 file. How can I fix it?
Additional question: what's the correct mime type for tar.bz2/tbz2 files? Different sources gave me all kinds of different answers: application/x-gtar, application/x-compressed-tar, application/x-bzip-compressed-tar, application/x-tar-bz2, application/x-bzip2, etc.
Same for tar.gz/tgz
Best Answer
There's a disclaimer in
/etc/mime.types
file:This means that you should have
application/x-tar
to map tarballs instead of separate content-type for each compressing method.You can safely copy it from
/etc/mime.types
for instance.