【发布时间】:2015-02-22 23:52:45
【问题描述】:
我正在尝试让我的 rails 应用程序在生产模式下运行,但我遇到了一些困难。
我正在使用带有 apache 的乘客,并且正在运行 Ubuntu 12.04。我已经配置和创建了我的生产数据库,并设置了乘客。状态如下:
$ rvmsudo passenger-status
Version : 4.0.56
Date : 2014-12-25 01:54:20 +0000
Instance: 7264
----------- General information -----------
Max pool size : 6
Processes : 0
Requests in top-level queue : 0
----------- Application groups -----------
但是,当我运行 rails server -e production 时,它仍然在端口 3000 上侦听,如下所示:
$ rails server -e production
=> Booting WEBrick
=> Rails 4.2.0 application starting in production on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2014-12-25 01:54:49] INFO WEBrick 1.3.1
[2014-12-25 01:54:49] INFO ruby 2.1.5 (2014-11-13) [i686-linux]
[2014-12-25 01:54:49] INFO WEBrick::HTTPServer#start: pid=7459 port=3000
为了让它在生产模式下监听端口 80,我可能缺少什么?
非常感谢。
【问题讨论】:
-
rails server -e production -p 80
标签: ruby-on-rails apache ubuntu passenger