-Ensure Phusion Passenger is installed and configured in apache.If you don't have them, run these two commands to install passenger and configure it automatically$ sudo gem install passenger
$ sudo passenger-install-apache2-module
-make a directory /var/www/mywebsites/
-throw the ruby app into /var/www/mywebsites/
eg scp -r cce /var/www/mywebsites/
-create a symbolic link to /var/www/mywebsites/cce/public
e.g ln -s /var/www/mywebsites/cce/public /var/www/cce
-Configure vHosts as follows
<VirtualHost *:80>
# Normal virtual host info
ServerName localhost
#ServerAlias *.seanbehan.com
DocumentRoot /var/www/
<Directory /var/www>
Options FollowSymLinks
AllowOverride None
Order deny,allow
allow from all
Satisfy all
</Directory>
RailsBaseURI /cce
<Directory /var/www/cce>
Options Indexes Multiviews FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
-------------------------------
We are done. Run http://localhost/cce and the app loads seamlessly.
Have fun!
Simon.
No comments:
Post a Comment