0

在我看来,我有:

<a href="<%= @project.file.url %>"><%= @project.file.name %></a>

在本地,在开发中,一切正常,我可以下载文件。但是在生产中的 VPS 上,我得到了 404:

[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

没有踪迹log/production.log

link_to工作正常。

这是我的 Apache(乘客)设置https://gist.github.com/4018657

我在子文件夹中访问我的应用程序,例如www.myapp.com/copisteria

这是config/initializers/dragonfly.rb https://github.com/enricostano/copisteria/blob/master/config/initializers/dragonfly.rb

这是config/application.rb https://github.com/enricostano/copisteria/blob/master/config/application.rb

任何提示?

编辑: Apache 或Passenger 似乎无法识别URL 中的子目录。

4

0 回答 0