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>
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 /opt/bitnami/apps/application/conf/application.conf with the following:
<VirtualHost *:80>
DocumentRoot /installdir/apps/application/public
<Directory /installdir/apps/application/public/>
Allow from all
Options -MultiViews
</Directory>
</VirtualHost>
Restart Apache server:
sudo /installdir/ctlscript.sh restart apache

Comments