-
Notifications
You must be signed in to change notification settings - Fork 447
Running a Ruby on Rails App in Sentora with Phusion Passenger
MBlagui edited this page Feb 16, 2016
·
9 revisions
A Ruby on Rails app can be hosted in Sentora running Phusion Passenger, the way to do it is not very intuitive but this is an attempt at explaining the method that has worked for me.
To do this, you will need:
- SSH sudo Access to the server
- Phusion Passenger for Apache
- Create an .htaccess file
- Install Ruby on Rails through rvm or rbenv
- (Optional) Install Capistrano to deploy your application directly from the terminal.
For Ubuntu:
https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#install_on_debian_ubuntu
For CentOS:
- Create a "domain" in your Sentora panel and give it a new home directory.
- Once the directory is active create an .htaccess file in the root home directory.
sudo -u git -H editor .htaccess
- The .htaccess file should contain the following code; just modify the 'domain_name' part with what you selected in the previous step. Make sure to change the
PassengerRuby
parameter to your Ruby installation directory. In my case I am using rvm and ruby 2.2.2
PassengerEnabled On
PassengerLoadShellEnvVars On
PassengerAppRoot /var/sentora/hostdata/zadmin/public_html/'domain_name'/current
PassengerRuby /usr/local/rvm/wrappers/"ruby-2.2.2"/ruby