我正在使用Rails 3.1 w/asset pipeline,phusion 3.0.x和apache 2.2.17。Rails 3資產管道+ Apache + Phusion乘客
。在http://guides.rubyonrails.org/asset_pipeline.html的配置文檔,第4.1.1節它說我需要一個部分添加到我的Apache配置:
<LocationMatch "^/assets/.*$">
# Some browsers still send conditional-GET requests if there's a
# Last-Modified header or an ETag header even if they haven't
# reached the expiry date sent in the Expires header.
Header unset Last-Modified
Header unset ETag
FileETag None
# RFC says only cache for 1 year
ExpiresActive On
ExpiresDefault "access plus 1 year"
</LocationMatch>
我一直在假設的Phusion乘客剛剛被「處理」這......還是我在沒有RTFM方面疏忽?如果我想利用指紋,我是否需要將其添加到apache配置中?
請注意,當前版本的文檔沒有「Header unset Last-Modified」部分。請參閱http://stackoverflow.com/questions/ 8344186/rails-3-1-on-apache-pagespeed-says-specify-cache-validator-when-using-asset-p解釋它被刪除的原因 – gravitystorm