<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>&amp;lt;blog&amp;gt;Matt Osentoski&amp;lt;/blog&amp;gt;: Tag Typo</title>
    <link>http://matt.osentoski.com/articles/tag/typo?tag=typo</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Installing Typo in the root of your domain on Site5</title>
      <description>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.
&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;1. Setup SSH access on your Site5 account. &lt;/strong&gt; Contact: shared@site5.com.
&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;2. Download the latest version of Typo&lt;/strong&gt; at: http://rubyforge.org/projects/typo/
&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;3. Create a directory for your Rails applications&lt;/strong&gt;.  SSH into your account and create a &lt;strong&gt;rails_apps&lt;/strong&gt; directory.  
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;&lt;notextile&gt;	&amp;gt; cd ~
	&amp;gt; mkdir rails_apps&lt;/notextile&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;strong&gt;4. SFTP your Typo file&lt;/strong&gt; into the rails_apps directory you just created.  The 
directory should be something like: /home/your_site_name/rails_apps
&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;5. Expand the Typo file. &lt;/strong&gt; SSH back into your account and issue the following 
commands:
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;&lt;notextile&gt;	&amp;gt; cd rails_apps
	&amp;gt; gunzip -c typo-4.0.3.tar | tar xvf -&lt;/notextile&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;	
(NOTE: replace typo-4.0.3.tar with the name of the file you grabbed from 
rubyforge.org.)
&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;6. Rename the original public_html directory.&lt;/strong&gt;
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;&lt;notextile&gt;	&amp;gt; cd ~
	&amp;gt; mv public_html public_html_orig&lt;/notextile&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;strong&gt;7. Create a symbolic link&lt;/strong&gt; to typo's public directory.
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;&lt;notextile&gt;	&amp;gt; cd ~
	&amp;gt; ln -s /home/your_site_name/rails_apps/typo-4.0.3/public public_html&lt;/notextile&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;strong&gt;8. Create the Typo database and database user.&lt;/strong&gt;
Login to the SiteAdmin for your account	and create a new database user and database.
Make sure you give the user the appropriate rights to the database you just created.
&lt;br /&gt;&lt;br /&gt;	
&lt;strong&gt;9. Prepopulate the typo database.&lt;/strong&gt;  (NOTE: This can also be accomplished using
the import function in phpMyAdmin from SiteAdmin.)
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;&lt;notextile&gt;	&amp;gt; mysql -u sitename_username -p
	use your_database_name
	source /home/your_site_name/rails_apps/typo-4.0.3/db/schema.mysql.sql&lt;/notextile&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;strong&gt;10. Modify the environment.rb file.&lt;/strong&gt;  This file should be located at:&lt;br /&gt;
/home/your_site_name/rails_apps/typo-4.0.3/config/environment.rb
&lt;br /&gt;
Uncomment the following line:
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;notextile&gt;&lt;span class="constant"&gt;ENV&lt;/span&gt;&lt;span class="punct"&gt;['&lt;/span&gt;&lt;span class="string"&gt;RAILS_ENV&lt;/span&gt;&lt;span class="punct"&gt;']&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;production&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;&lt;/notextile&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
Then add the RAILS_ROOT after:
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;notextile&gt;&lt;span class="constant"&gt;RAILS_ROOT&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;/home/your_site_name/rails_apps/typo-4.0.3&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;&lt;/notextile&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;strong&gt;11. Modify the database.yml file.&lt;/strong&gt;  This file should be located at:&lt;br /&gt;
/home/your_site_name/rails_apps/typo-4.0.3/config/database.yml
&lt;br /&gt;&lt;br /&gt;
Modify the entries for the production application using the database information
from Step 8.
&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;12. Verify your .htaccess file.&lt;/strong&gt; Located at: /home/your_site_name/rails_apps/typo-4.0.3/public/.htaccess
&lt;br /&gt;
This file should contain the following lines:
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;notextile&gt;&lt;span class="constant"&gt;RewriteEngine&lt;/span&gt; &lt;span class="constant"&gt;On&lt;/span&gt;

&lt;span class="constant"&gt;RewriteRule&lt;/span&gt; ^&lt;span class="global"&gt;$ &lt;/span&gt;&lt;span class="ident"&gt;index&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;html&lt;/span&gt; &lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="constant"&gt;QSA&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt;
&lt;span class="constant"&gt;RewriteRule&lt;/span&gt; ^&lt;span class="punct"&gt;([^.]+)&lt;/span&gt;&lt;span class="global"&gt;$ $1&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;html&lt;/span&gt; &lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="constant"&gt;QSA&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt;
&lt;span class="constant"&gt;RewriteCond&lt;/span&gt; &lt;span class="punct"&gt;%{&lt;/span&gt;&lt;span class="string"&gt;REQUEST_FILENAME&lt;/span&gt;&lt;span class="punct"&gt;}&lt;/span&gt; &lt;span class="punct"&gt;!-&lt;/span&gt;&lt;span class="ident"&gt;f&lt;/span&gt;
&lt;span class="constant"&gt;RewriteRule&lt;/span&gt; ^&lt;span class="punct"&gt;(.*)&lt;/span&gt;&lt;span class="global"&gt;$ &lt;/span&gt;&lt;span class="ident"&gt;dispatch&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;fcgi&lt;/span&gt; &lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="constant"&gt;QSA&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;&lt;span class="constant"&gt;L&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt;&lt;/notextile&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;strong&gt;13. Restart dispatch.fcgi.&lt;/strong&gt;  From a command prompt, run the following line:
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;&lt;notextile&gt;	&amp;gt; pkill -9 -u your_username_here -f dispatch.fcgi&lt;/notextile&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;	
(NOTE: replace your_username_here with the username you used to SSH into 
the server.)
&lt;br /&gt;&lt;br /&gt;
You should be all set!  Try to access your domain, you should be greeted with the
Typo setup screen.</description>
      <pubDate>Tue, 02 Jan 2007 14:42:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:e6b0f27b-d922-4f88-b01b-6d420fe20ee1</guid>
      <author>Matt Osentoski</author>
      <link>http://matt.osentoski.com/articles/2007/01/02/installing-typo-in-the-root-of-your-domain-on-site5</link>
      <category>Rails</category>
      <category>Site5</category>
      <category>Typo</category>
      <category>Rails</category>
    </item>
  </channel>
</rss>
