I have a bunch of gzipped log files I'd like to serve with nginx. I want them to be served in such a way that they're automatically inflated by the browser. I assume that means I need nginx to send the files as .gz with a text/plain header. This can be done in apache with something like:
<FilesMatch *.gz>
ForceType text/plain
</FilesMatch>
Best Answer
You need the
HttpGzipStatic
module for this. Putgzip_static on;
in your config and create your.gz
files. You will need to keep both the zipped and the original file, you can then request, for example,/css.css
and be served the zipped/css.css.gz