简体   繁体   中英

How to start rails server with apache restart?

I'm having some issues deploying rails on a CentOS machine.

I think running rails s -d will make it persist after the ssh window is closed. However what happens if restarts?

How to make it run rails s -d in case apache does restart?

You best chance for this would be to run your Rails application as a Apache module, using Passenger . Once Passenger is setup, you have a nice guide to explain how to deploy your app on it.

I would suggest using passenger with apache it will solve your problem ..

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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