@@ -789,41 +789,6 @@ location ~ ^/assets/ {
789789}
790790```
791791
792- #### GZip Compression
793-
794- When files are precompiled, Sprockets also creates a
795- [ gzipped] ( http://en.wikipedia.org/wiki/Gzip ) (.gz) version of your assets. Web
796- servers are typically configured to use a moderate compression ratio as a
797- compromise, but since precompilation happens once, Sprockets uses the maximum
798- compression ratio, thus reducing the size of the data transfer to the minimum.
799- On the other hand, web servers can be configured to serve compressed content
800- directly from disk, rather than deflating non-compressed files themselves.
801-
802- NGINX is able to do this automatically enabling ` gzip_static ` :
803-
804- ``` nginx
805- location ~ ^/(assets)/ {
806- root /path/to/public;
807- gzip_static on; # to serve pre-gzipped version
808- expires max;
809- add_header Cache-Control public;
810- }
811- ```
812-
813- This directive is available if the core module that provides this feature was
814- compiled with the web server. Ubuntu/Debian packages, even ` nginx-light ` , have
815- the module compiled. Otherwise, you may need to perform a manual compilation:
816-
817- ``` bash
818- ./configure --with-http_gzip_static_module
819- ```
820-
821- If you're compiling NGINX with Phusion Passenger you'll need to pass that option
822- when prompted.
823-
824- A robust configuration for Apache is possible but tricky; please Google around.
825- (Or help update this Guide if you have a good configuration example for Apache.)
826-
827792### Local Precompilation
828793
829794There are several reasons why you might want to precompile your assets locally.
0 commit comments