Get NGINX to serve .gz compressed asset files
问题 Rails 3.1 has a convenient system which can compress files into .gz files. However, instead what I've done is I've moved all the asset files that are created with assets:precompile to a static webserver. This all works, but how can I get nginx to serve the .gz files normally? 回答1: 1) ensure you have Nginx > 1.2.x (to proper headers modifications) and compile with --with-http_gzip_static_module option 2) Enable this option gzip on (to serve back-end response with gzip header) 3) Setup assets