Phusion Passenger 出现错误:未在 Ubuntu 上运行
我正在尝试使用 Phusion Passenger 来托管 Ubuntu 11.04 中的 Rails 3 应用程序。我安装了 Passenger apache2 模块,并按照说明编辑 apache2.conf 文件和所有内容。我还重新启动了我的 apache 服务器,我得到了这个:
- Restarting web server apache2 [Tue Aug 09 10:41:36 2011] [warn] 模块user_module 已加载,正在跳过 apache2:无法可靠地确定服务器的完全限定域名,使用 127.0.1.1 作为 ServerName ...等待 [Tue Aug 09 10:41:37 2011] [warn] 模块user_module 已加载,正在跳过 apache2:无法可靠地确定服务器的完全限定域名,使用 127.0.1.1 作为 ServerName [ OK ]
我能够访问 localhost/testapp,但是当我到达那里时,我得到的不是 Rails 应用程序,而是“/testapp 索引”页面,其中仅列出了文件系统。当我运行命令 Passenger-status 时,我得到以下信息:
错误:Phusion Passenger 似乎没有运行。
有什么想法吗?
I'm trying to user Phusion Passenger to host my Rails 3 app from Ubuntu 11.04. I installed the passenger apache2 module and followed the instructions for editing my apache2.conf file and everything. I also restarted my apache server and I'm getting this:
- Restarting web server apache2
[Tue Aug 09 10:41:36 2011] [warn] module passenger_module is already loaded, skipping
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting [Tue Aug 09 10:41:37 2011] [warn] module passenger_module is already loaded, skipping
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[ OK ]
I'm able to get to localhost/testapp but when I get there, instead of a rails app, I get an "index of /testapp" page with just the file system laid out. When I run the command passenger-status, I get this:
ERROR: Phusion Passenger doesn't seem to be running.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的系统上可能存在多个问题,但这一个是最明显的:
这意味着您的配置文件中有两个“LoadModule Passenger_module ...”指令。旧的可能已经过时,并指向旧版本的 Phusion Passenger。您需要删除它,否则会引起冲突。
另一个可能与文件系统权限有关。 Apache 运行的用户必须能够检查文件“config/environment.rb”和“config.ru”是否存在于您的应用程序根目录中,即它必须对必要的目录和所有父目录具有可执行权限。
最后一个可能的问题是您已将 DocumentRoot 设置为应用程序根目录,但您应该将其设置为“public”目录。
There are probably multiple issues on your system, but this one is the most obvious:
This means you have two "LoadModule passenger_module ..." directives in your config files. The old one is probably stale and points to an older version of Phusion Passenger. You need to remove that or it'll cause conflicts.
The other one is probably related to filesystem permissions. The user that Apache runs as must be able to check whether the file 'config/environment.rb' and 'config.ru' exist in your app root, i.e. it must have executable permissions to the necessary directories and all parent directories.
The final possible issue is that you've set DocumentRoot to the application root, but you're supposed to set it to the 'public' directory.