Rails 3.1、Unicorn、Apacheのセットアップがあります。私のApache設定は以下のとおりで、production.rbは次のようになります。私はh264ストリーミングを使用するのが好きですが、Railsがこれらのビデオファイルを提供しているため、ApacheModは機能しません。
DocumentRoot /blabla/current/public
RewriteEngine On
Options FollowSymLinks
<Proxy balancer://unicornservers>
BalancerMember http://127.0.0.1:4000
</Proxy>
# Redirect all non-static requests to rails
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://unicornservers%{REQUEST_URI} [P,QSA,L]
ProxyPass / balancer://unicornservers/
ProxyPassReverse / balancer://unicornservers/
ProxyPreserveHost on
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
XSendFile On
XSendFileAllowAbove on
serve_static_assetsを有効にする必要があります。そうしないと、静的なものをダウンロードできません。私もアセットをプリコンパイルしましたが、Rails(Rackだと思います)がサービスを提供していない限り、パブリックディレクトリからファイルを利用できないため、違いはありません。
config.action_controller.asset_hostを使用する必要がありますか、それともApacheの構成に問題がありますか。