【发布时间】:2011-08-10 07:24:16
【问题描述】:
我刚刚完成了我的第一个 Rails 应用程序,并准备部署到我的 VPS。我决定尝试使用 Phusion Passenger 并完成了极其简单的安装过程。我得到了所有正确的依赖关系,所以最终一切似乎都很好。我认为我的问题在于路由和 apache 配置文件。
正如我所说,我在以下文件的最后添加了以下内容:/etc/apache2/apache2.conf
LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-3.0.8/ext/apache2/mod_passenger.so
PassengerRoot /var/lib/gems/1.8/gems/passenger-3.0.8
PassengerRuby /usr/bin/ruby1.8
<VirtualHost *:80>
ServerName localhost
DocumentRoot /home/bl/gfy/public
<Directory /home/bl/gfy/public>
Allow from all
Options -MultiViews
</Directory>
</VirtualHost>
当我重新启动 apache 时,我收到以下消息:
* Restarting web server apache2 [Wed Aug 10 03:16:24 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 [Wed Aug 10 03:16:26 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
当我将浏览器指向我设置的 IP 时,我会指向 apache 附带的示例文件,而不是我的 rails 应用程序。
任何想法都将不胜感激。
谢谢。
【问题讨论】:
-
您是否尝试过将 ServerName 更改为不是 localhost?让我们知道会发生什么。
-
@Thiago Jackiw 我尝试将服务器名称更改为我的应用程序的名称,但这也不起作用。此外,我不仅有服务器的 IP,还没有真正要指定的服务器名称。
标签: ruby-on-rails ruby apache passenger