0

I know rails is the ruby framework and apache is the server of rails.While what is Phusion Passenger used for? Is it a server or a deploy tool?

Now I am trying to deploy my rails app on the server,while I don`t know how to use Phusion Passenger and apache to get my app running ):

thanks in advance

1 Answer 1

3

Phusion Passenger is just an apache mod that needs to be activated in the virtual host your application is using, telling apache which version of Rails is used and other configurations like this one. So basically, Apache uses Passenger to run Ruby on Rails applications.

You have to read this in order to install Passenger : https://www.phusionpassenger.com/download (just scrool down a little to read the open source version documentation).

And this in order to set it up and run it for one of your applications : http://www.modrails.com/documentation/Users%20guide%20Apache.html#_configuring_phusion_passenger So, yeah, a lot of text in here but you don't need to read everything fortunately.

Besides, when you install it, Passenger will tell you exactly what to write in your Virtual Host configuration and basically, there are only 2 lines of text. : )

Most of the time, if you have a virtual Host that looks like so :

<VirtualHost *:80>
    ServerName www.wsgiapp.com
    DocumentRoot /webapps/wsgiapp/public
    <Directory /webapps/wsgiapp/public>
        Allow from all
        Options -MultiViews
    </Directory>
</VirtualHost>

Passenger will tell you to write something like this once installed :

<VirtualHost *:80>
    ServerName www.wsgiapp.com
    DocumentRoot /webapps/wsgiapp/public

    PassengerRuby /usr/bin/ruby
    PassengerRoot /somewhere/passenger/x.x.x

    <Directory /webapps/wsgiapp/public>
        Allow from all
        Options -MultiViews
    </Directory>
</VirtualHost>
3
  • Now the passenger is installed on my server.after I run this command "passenger-install-apache2-module", do I need to install apache again using yum install httpd? thanks
    – Felix
    Jan 29, 2013 at 15:14
  • No, as the command is self-explanatory, Passenger is a module that is installed only once Apache is. So I guess you already have Apache installed and don't need to reinstall it. It's basically as simple as activating another module like mod_rewrite for Apache. Except in the case of Rails, there are no default module but a "custom" one : Passenger.
    – Raindal
    Jan 29, 2013 at 15:17
  • thanks a lot. It works :)It has bean spent me two days to config my linux server ):
    – Felix
    Jan 29, 2013 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.