【问题标题】:rails with apache2 and passenger带有 apache2 和乘客的导轨
【发布时间】:2011-05-23 14:47:50
【问题描述】:

我按照这个tutorial 安装rails,安装一个演示应用程序,然后我在文件sites-available/mysite.com 中添加了这些行

...
DocumentRoot /path/mysite.com/public
RailsEnv development
RackEnv development
...

当我尝试连接到我得到的 url 时

Not Found

The requested URL /rails/info/properties was not found on this server.

【问题讨论】:

  • tail -f logs/error.log 脚本头过早结束:

标签: ruby-on-rails-3 apache2 passenger


【解决方案1】:

您正在单击 Rails 默认 index.html 页面上的 “关于应用程序的环境” 链接。此链接仅适用于development 环境,不适用于production

我们的想法是在交付生产之前完全删除 public/index.html 文件。

【讨论】:

  • 好的。但是,当我删除 public/index.html 时。我收到 500 内部服务器错误
  • 那么你需要在config/routes.rb中定义一个根路由——见Rails Routing from the Outside In
  • config/routes.rb 我有root :to => 'pages#home'
  • 然后检查您的日志文件,了解服务器抛出该错误的原因。可能是乘客设置不正确,可能是多种原因。
猜你喜欢
  • 1970-01-01
  • 2011-09-13
  • 1970-01-01
  • 2023-03-19
  • 1970-01-01
  • 2011-07-20
  • 1970-01-01
  • 2011-07-21
  • 2012-02-16
相关资源
最近更新 更多