Apache/Rails/Passenger 显示站点索引? [英] Apache/Rails/Passenger Displaying Site Index?

查看:30
本文介绍了Apache/Rails/Passenger 显示站点索引?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Rails 应用程序,我已成功地使用 Mongrel 和 Webkit 对其进行了测试.现在我想测试部署.我使用 Ubuntu 8.04 设置了一个 VMWare 映像.我已经按照这种方法安装了 Rails https://help.ubuntu.com/community/RubyOnRails使用 Gems 1.3 而不是 1.2 的例外.我已经配置并安装了Passenger.但是,当我访问我的网站索引 (http://some.ip.that.i'm.testing/) 我只是获取我的 rails 站点的目录索引.我应该注意,因为我正在测试,所以我只是将我的应用程序转储到/var/www 中.

I have a Rails app that I have successfully tested with Mongrel and Webkit. Now I want to test deployment. I set up a VMWare Image using Ubuntu 8.04. I have installed Rails following this method https://help.ubuntu.com/community/RubyOnRails with the exception of using Gems 1.3 instead of 1.2. I have configured and installed Passenger. However, when I visit my sites index (http://some.ip.that.i'm.testing/) I simply get the directory index of my rails site. I should note that since I'm testing I just dumped my app in /var/www.

我的 Apache2 error.log 文件仅显示此内容:

My Apache2 error.log file shows this and this only:

[2008 年 9 月 30 日星期二 15:10:41] [通知] Apache/2.2.8 (Ubuntu) Phusion_Passenger/2.0.3 已配置——恢复正常运行

[Tue Sep 30 15:10:41 2008] [notice] Apache/2.2.8 (Ubuntu) Phusion_Passenger/2.0.3 configured -- resuming normal operations

知道是什么导致了这个问题吗?似乎Passenger 配置正确,但我不确定为什么我的rails 应用程序没有显示以及为什么站点的目录列表显示.

Any idea what could be causing this problem? It seems Passenger is configured properly, but I'm not sure why my rails app is not displaying and why the site's directory listing is.

谢谢.

推荐答案

两个问题:

1) Rails 是否在服务器上运行?乘客应该在第一次请求时自动启动 Rails - 如果你执行 ps,你看到它正在运行吗?

1) Is Rails running at all on the server? Passenger should start Rails automatically on first request - if you do a ps, do you see it running?

2) 您看到的是哪个目录 - 是您的 rails 目录还是 public/目录?如果是前者,则您的符号链接可能指向错误的位置(应该公开/).

2) Which directory are you seeing - is it your rails directory or the public/ directory? If it's the former, your symlink is likely pointing the wrong place (it should go to public/).

(我以前见过这个问题,我正在努力记住我是如何调试它的……这是我的前两个想法.)

(I've seen this problem before and am trying to remember how I debugged it... these are my first two thoughts.)

这篇关于Apache/Rails/Passenger 显示站点索引?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆