gpt4 book ai didi

ruby-on-rails - Rails 应用程序不适用于 Apache + Passenger

转载 作者:数据小太阳 更新时间:2023-10-29 07:40:12 24 4
gpt4 key购买 nike

我正在尝试在新的虚拟机上托管 rails2 应用程序,该虚拟机是 CentOS 6 和 Parallels Plesk Panel 11(64 位)。我已经使用给定的步骤成功安装了 RVM、ruby、rails 和 passanger here

我已正确执行所有步骤。我已经安装了 ruby 1.8.7rails 2.0.2

现在的问题是,我可以在新服务器的 3000 端口使用 Webrick 服务器运行应用程序。那里一切正常。但是当我想用 apache 运行它时,它不运行。当我点击 url 时,它返回页面

Not Found

The requested URL /account/login was not found on this server. Apache Server at www.mem.com Port 80

这是我的 passanger.conf 文件:

/etc/httpd/conf.d/passenger.conf

    LoadModule passenger_module /usr/local/rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.19/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.19
PassengerRuby /usr/local/rvm/wrappers/ruby-1.8.7-p371/ruby

这是我的虚拟主机代码:

/etc/httpd/sites-available/mem.conf

    <VirtualHost *:80>
ServerAdmin youremail@example.com
DocumentRoot /var/www/mem/public
ServerName www.mem.com
ErrorLog /var/log/httpd/mem/error.log
CustomLog /var/log/httpd/mem/access.log common
</VirtualHost>

如有任何建议,我们将不胜感激。

最佳答案

问题已经解决。网络托管公司已经创建了一个具有不同文档根目录的虚拟主机。我将我的应用程序目录移动到该路径并启动了应用程序。感谢大家的建议。

关于ruby-on-rails - Rails 应用程序不适用于 Apache + Passenger,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14729207/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com