title: wrong URLs deploying to a subdirectory
body: <p>in my view I have:</p>
  
  <pre><code>&lt;a href="&lt;%= @project.file.url %&gt;"&gt;&lt;%= @project.file.name %&gt;&lt;/a&gt;
  </code></pre>
  
  <p>locally, in development, all works fine and I can download the file. But on my VPS in production I get a 404:</p>
  
  <pre><code>[Mon Nov 05 18:28:40 2012] [error] [client 88.7.246.152] File does not exist: 
    /srv/http/media, referer: http://www.stanosas.it/copisteria/projects/1
  </code></pre>
  
  <p>no trace in <code>log/production.log</code></p>
  
  <p><code>link_to</code> works fine.</p>
  
  <p>here is my Apache (Passenger) setup <a href="https://gist.github.com/4018657" rel="nofollow">https://gist.github.com/4018657</a></p>
  
  <p>I access my app in a subfolder like <code>www.myapp.com/copisteria</code></p>
  
  <p>here is <code>config/initializers/dragonfly.rb</code> <a href="https://github.com/enricostano/copisteria/blob/master/config/initializers/dragonfly.rb" rel="nofollow">https://github.com/enricostano/copisteria/blob/master/config/initializers/dragonfly.rb</a></p>
  
  <p>here is <code>config/application.rb</code> <a href="https://github.com/enricostano/copisteria/blob/master/config/application.rb" rel="nofollow">https://github.com/enricostano/copisteria/blob/master/config/application.rb</a></p>
  
  <p>any hint?</p>
  
  <p>EDIT: It seems that Apache or Passenger doesn't recognize the subdirectory in URLs.</p>