我试图让我的rails应用程序在生产模式下运行,但我遇到了一些困难。
我和apache一起使用客运,运行的是Ubuntu12.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端口上监听?
在此之前,非常感谢您。
发布于 2014-12-25 04:58:27
我不认为这是使用Apache在生产中启动服务器的方式。你安装了apache-paassenger模块吗?并修改了apache conf文件?
首先,需要在系统上安装gem:
gem install passenger 在编译Apache模块之前,还需要安装两个依赖包:
apt-get install curl-devel httpd-devel 使用以下命令启动apache安装:这需要一些时间
passenger-install-apache2-module乘客将在Apache安装后显示一些内容:
跟踪它并在(/etc/httpd/conf/httpd.conf)中进行更改
您必须指向应用程序公用文件夹并重新启动apache服务器,然后紧跟这些源。
当我第一次做这件事的时候,它起了作用。
https://stackoverflow.com/questions/27644070
复制相似问题