【发布时间】:2010-12-15 18:49:41
【问题描述】:
我在带有 apache 2.0 的 CentOS 服务器上使用 Ruby on Rails。但不知何故,网站的根目录没有加载。它以下载的形式出现,具有正确的内容。但它需要作为html作为服务器。站点内的其他链接工作正常(通过向 .htaccess 添加 text/html 类型)。此外,当直接访问 mongrel 时,root 确实出现了。或者当我将 index.html 放入 rails 应用程序的公共文件夹时,它也会被加载。
我的 .htaccess:
DefaultType text/html # added for the other pages to get them working, like /products
RewriteCond %{HTTP_HOST} ^www.example.com$
RewriteRule .* "http://127.0.0.1:12001%{REQUEST_URI}" [P,QSA,L]
Rails 版本:2.3.8
杂种版本:1.1.5
阿帕奇版本:2.0.63
【问题讨论】:
标签: ruby-on-rails apache mongrel