Phusion Passenger

    How to configure Apache with Phusion Passenger

    Make sure you have the Phussion Passenger enabled. Check if the following line is uncommented in Apache config file /installdir/apache2/con/httpd.conf:

    Include conf/bitnami/passenger.conf
    

    Assuming you have your application running in /application location, substitute the content of the file /installdir/apps/application/conf/application.conf with the following:

    <VirtualHost *:80>
      PassengerEnabled on
      RailsBaseURI /application
      <Directory /installdir/apache2/htdocs/application>
        Options -MultiViews
      </Directory>
    </VirtualHost>
    

    Then ssh to your machine and create a symbolic link:

    sudo ln -s /installdir/apps/application/public /installdir/apache2/htdocs/application
    

    (You should make sure that the 'public' and 'config' application folders and their parent directories are readable and executable by Apache).

    Restart Apache server:

    sudo /installdir/ctlscript.sh restart apache
    

    How to change the default URL with Phusion Passenger

    Please make sure you have the Phussion Passenger enabled (check the previous section for the details). Then substitute the content of the file /installdir/apps/application/conf/application.conf with the following:

    <VirtualHost *:80>
      DocumentRoot /installdir/apps/application/public
      <Directory /installdir/apps/application/public/>
        PassengerEnabled on
        Options -MultiViews
        <IfVersion < 2.3 >
        Order allow,deny
        Allow from all
        </IfVersion>
        <IfVersion >= 2.3>
        Require all granted
        </IfVersion>
      </Directory>
    </VirtualHost>
    

    Restart Apache server:

    sudo /installdir/ctlscript.sh restart apache
    

    How to fix Passenger error for OS X 10.11 El Capitan?

    IMPORTANT: If you are using OS X and you upgraded to OS X 10.11 "El Capitan", it is necessary to do the following fix in order to continue using Passenger. This is required because of the new System Integrity Protection:

     

    1. Go to your installation directory, e.g. /Applications/redmine-3.1.1-0/ and stop the servers using the Graphical "manager" tool.

    2. Rename "PassengerAgent" binary to "PassengerAgent.bin". If you prefer the terminal this is the command:

    mv /Applications/redmine-3.1.1-0/ruby/lib/ruby/gems/2.0.0/gems/passenger-5.0.6/buildout/support-binaries/PassengerAgent /Applications/redmine-3.1.1-0/ruby/lib/ruby/gems/2.0.0/gems/passenger-5.0.6/buildout/support-binaries/PassengerAgent.bin

    3. Create a new file in the same location "PassengerAgent" with the following content. Replace the installation directory with your current installation directory:

    #!/bin/sh
    
    . /Applications/redmine-3.1.1-0/scripts/setenv.sh
    
    exec /Applications/redmine-3.1.1-0/ruby/lib/ruby/gems/2.0.0/gems/passenger-5.0.6/buildout/support-binaries/PassengerAgent.bin"$@"

    4. Change the permissions of the new file:

    chmod 755 /Applications/redmine-3.1.1-0/ruby/lib/ruby/gems/2.0.0/gems/passenger-5.0.6/buildout/support-binaries/PassengerAgent

    5. Restart the server. You can use the Manager tool or from command:

    ./ctlscript.sh restart apache
    Tag page (Edit tags)
    • No tags
    Pages that link here
    Page statistics
    30127 view(s), 12 edit(s) and 3805 character(s)

    Comments

    You must login to post a comment.

    Attach file

    Attachments