Skip to content

Commit a24ef86

Browse files
committed
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.
1 parent 9027ce9 commit a24ef86

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed

guides/source/asset_pipeline.md

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -547,35 +547,7 @@ This directive is available if the core module that provides this feature was co
547547

548548
If you're compiling nginx with Phusion Passenger you'll need to pass that option when prompted.
549549

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.)
579551

580552
### Local Precompilation
581553

0 commit comments

Comments
 (0)