From FIA Wiki
Jump to: navigation, search


Step 1: install gem Install the Passenger gem with:

 $gem install passenger --no-rdoc --no-ri

The --no-rdoc --no-ri argument isn't really necessary, but it makes installation faster by skipping generation of API documentation.

Did gem install abort with a "permission denied" error? Then re-run it with rvmsudo. Since you are using RVM, don't use sudo! Always use rvmsudo instead when executing Ruby-related commands! Learn more about rvmsudo at the RVM website.

Step 2: run the Passenger Apache module installer Run the Passenger Apache module installer and follow the on-screen instructions:


At the end of the installation process, you will be asked to copy and paste a configuration snippet (containing LoadModule, PassengerRoot, etc.) into your Apache configuration file.

Different operating systems and Apache installations have different conventions with regard to where the Apache configuration file is and how it is organized. Please read Working with the Apache configuration file if you are not familiar with it. That page is especially of interest for macOS Server >= 10.8 users because the configuration file may be at a surprising location.

Apache VirtualHost Config

       <VirtualHost *:80>
             PassengerEnabled on
             PassengerFriendlyErrorPages on
             PassengerAppEnv development
             RailsEnv development
             SetEnv development
             DocumentRoot "path/to/public"
             ErrorLog ""
             CustomLog "" common
             <Directory "/path/to/public">
                     AllowOverride None
                     Options -MultiViews
                     Require all granted
  1. if Hosting from a subdir
       #PassengerBaseURI /sitetwo # subpath
       #PassengerAppRoot /filepath/to/applicaion/root