Hi,
We have only gzipped files stored on nginx and need to serve client that :
A) Support gzip transfer encoding (> 99% of the clients). They send
Accept-Encoding: gzip header...
B) < 1% of the clients that don't support transfer encoding. The don't send
Accept-Encoding header.

There is ample CPU in the nginx servers to support clients of type B).  But
I am unable to figure out a config/reasonable script
to help us serve these clients.

Clients of type A) are served with the following config.
--- Working config that appends .gz in the try_files ----
    location /compressed_files/ {
        add_header Content-Encoding "gzip";
        expires    48h;
        add_header Cache-Control private;
        try_files $uri.gz @lua_script_for_missing_file;
    }


----- Not working  config  with gunzip on; likely because gunzip filter
runs before add_header?

    location /compressed_files/ {
        add_header Content-Encoding "gzip";

        expires    48h;
        add_header Cache-Control private;
*# gunzip on fails to uncompress likely because it does not notice the
add_header directive.*
*        gunzip on;*
*        gzip_proxied any;*
        try_files $uri.gz @lua_script_for_missing_file;
    }


I would appreciate any pointers on how to do this. I may be missing some
obvious configuration for such case.
We did discuss keeping both unzipped and zipped version on the server, but
unfortunately that is unlikely to happen.

Thanks,
Hemant
_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to