You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Revert "added details to section 4.1.2 of the Asset Pipeline guide, describing how to configure Apache to serve the gzipped version of the precompiled assets"
This reverts commit aec466e.
Reason: We're not sure about the correctness and won't want to document
something like this with doubts.
Copy file name to clipboardExpand all lines: guides/source/asset_pipeline.md
+1-29Lines changed: 1 addition & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -547,35 +547,7 @@ This directive is available if the core module that provides this feature was co
547
547
548
548
If you're compiling nginx with Phusion Passenger you'll need to pass that option when prompted.
549
549
550
-
Apache is also able to serve the [gzipped](http://en.wikipedia.org/wiki/Gzip) version of your assets; however, it requires a bit more work:
551
-
552
-
```apache
553
-
<LocationMatch "^/assets/.*$">
554
-
Header unset ETag
555
-
FileETag None
556
-
557
-
# RFC says only cache for 1 year
558
-
ExpiresActive On
559
-
ExpiresDefault "access plus 1 year"
560
-
561
-
RewriteEngine On
562
-
RewriteCond %{HTTP:Accept-Encoding} gzip
563
-
RewriteCond %{HTTP_USER_AGENT} !Konqueror
564
-
RewriteCond %{REQUEST_FILENAME}.gz -f
565
-
RewriteRule ^(.+).(css|js)$ $1.$2.gz [QSA,L]
566
-
</LocationMatch>
567
-
568
-
<FilesMatch \.css\.gz>
569
-
ForceType text/css
570
-
</FilesMatch>
571
-
572
-
<FilesMatch \.js\.gz>
573
-
ForceType application/javascript
574
-
</FilesMatch>
575
-
AddEncoding gzip .gz
576
-
```
577
-
578
-
NOTE: You will need to make sure `mod_headers`, `mod_mime` and `mod_rewrite` are loaded; otherwise, the above configuration will fail.
550
+
A robust configuration for Apache is possible but tricky; please Google around. (Or help update this Guide if you have a good example configuration for Apache.)
0 commit comments