Installing Typo in the root of your domain on Site5
Posted by Matt Osentoski Tue, 02 Jan 2007 19:42:00 GMT
Site5 has an automated process for adding Typo blogs to your website. This works fine except the blog is created in a directory off of the domain. For example: www.test.com/blog instead of www.test.com. Follow the steps below to install Typo into the root of your domain. This process should also work for your own custom Rails apps.1. Setup SSH access on your Site5 account. Contact: shared@site5.com.
2. Download the latest version of Typo at: http://rubyforge.org/projects/typo/
3. Create a directory for your Rails applications. SSH into your account and create a rails_apps directory.
> cd ~
> mkdir rails_apps 5. Expand the Typo file. SSH back into your account and issue the following commands:
> cd rails_apps
> gunzip -c typo-4.0.3.tar | tar xvf - 6. Rename the original public_html directory.
> cd ~
> mv public_html public_html_orig > cd ~
> ln -s /home/your_site_name/rails_apps/typo-4.0.3/public public_html 9. Prepopulate the typo database. (NOTE: This can also be accomplished using the import function in phpMyAdmin from SiteAdmin.)
> mysql -u sitename_username -p
use your_database_name
source /home/your_site_name/rails_apps/typo-4.0.3/db/schema.mysql.sql /home/your_site_name/rails_apps/typo-4.0.3/config/environment.rb
Uncomment the following line:
ENV['RAILS_ENV'] = 'production' RAILS_ROOT = '/home/your_site_name/rails_apps/typo-4.0.3' /home/your_site_name/rails_apps/typo-4.0.3/config/database.yml
Modify the entries for the production application using the database information from Step 8.
12. Verify your .htaccess file. Located at: /home/your_site_name/rails_apps/typo-4.0.3/public/.htaccess
This file should contain the following lines:
RewriteEngine On
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] > pkill -9 -u your_username_here -f dispatch.fcgi You should be all set! Try to access your domain, you should be greeted with the Typo setup screen.
