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
    
    Tag page (Edit tags)
    • No tags
    Pages that link here
    Page statistics
    19887 view(s), 8 edit(s) and 2001 character(s)

    Comments

    You must login to post a comment.

    Attach file

    Attachments