简体   繁体   English

如何用apache重启启动rails服务器?

[英]How to start rails server with apache restart?

I'm having some issues deploying rails on a CentOS machine. 我在CentOS机器上部署rails时遇到了一些问题。

I think running rails s -d will make it persist after the ssh window is closed. 我认为运行rails s -d会在ssh窗口关闭后继续运行。 However what happens if restarts? 但是如果重新启动会发生什么?

How to make it run rails s -d in case apache does restart? 如果apache重新启动,如何使它运行rails s -d

You best chance for this would be to run your Rails application as a Apache module, using Passenger . 你最好的机会是使用Passenger将你的Rails应用程序作为Apache模块运行。 Once Passenger is setup, you have a nice guide to explain how to deploy your app on it. 一旦设置了Passenger,您就会有一个很好的指南来解释如何在其上部署您的应用程序。

I would suggest using passenger with apache it will solve your problem .. 我建议使用带apache的乘客它会解决你的问题..

follow
gem install passenger
passenger-install-apache2-module


For Apache installation
    apt-get install apache2-prefork-dev
    apt-get install libapr1-dev
    apt-get install libaprutil1-dev

visit 访问

http://www.modrails.com/documentation/Users%20guide%20Apache.html http://www.modrails.com/documentation/Users%20guide%20Apache.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM