作者热门文章
- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
我正在尝试在新的虚拟机上托管 rails2 应用程序,该虚拟机是 CentOS 6 和 Parallels Plesk Panel 11(64 位)。我已经使用给定的步骤成功安装了 RVM、ruby、rails 和 passanger here
我已正确执行所有步骤。我已经安装了 ruby 1.8.7 和 rails 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/
我是一名优秀的程序员,十分优秀!