<?xml version="1.0" encoding="UTF-8"?>
<wiki>
  <body>&lt;h2&gt;Server setup&lt;/h2&gt;
&lt;p&gt;Stream of Consciousness runs with Ruby/&lt;span class=&quot;caps&quot;&gt;CGI&lt;/span&gt;.  I run this via mod_ruby but plain &lt;span class=&quot;caps&quot;&gt;CGI&lt;/span&gt; mode should work.  You can acquire mod_ruby &lt;a href=&quot;http://www.modruby.net/en/&quot;&gt;here&lt;/a&gt;.  Installation may vary, but on my Debian 4/Apache2 server, appended the following to apache2.conf worked for me:&lt;/p&gt;
&lt;pre&gt;
AddType text/html .rhtml

&amp;lt;IfModule mod_ruby.c&amp;gt;
  RubyRequire apache/ruby-run
  RubyRequire apache/eruby-run
RubySafeLevel 0
  # Execute *.rbx files as Ruby scripts                                                                                                                                                                        
  &amp;lt;Files *.rbx&amp;gt;
Options +ExecCGI

SetHandler ruby-object
  RubyHandler Apache::RubyRun.instance
  &amp;lt;/Files&amp;gt;

  # Handle *.rhtml files as eRuby files                                                                                                                                                                        
  &amp;lt;Files *.rhtml&amp;gt;
  SetHandler ruby-object
  RubyHandler Apache::ERubyRun.instance
  &amp;lt;/Files&amp;gt;
&amp;lt;/IfModule&amp;gt;

&lt;/pre&gt;
&lt;p&gt;If you are setting this up on a shared web host, the following should be helpful: http://www.urbanhonking.com/ideasfordozens/archives/2008/03/developing_sing.html&lt;/p&gt;
&lt;h2&gt;Basic setup&lt;/h2&gt;
&lt;p&gt;Once this is done you should be able to drop the index.rbx file in any directory in your web site, create a directory to hold your blog posts, edit the &amp;#8220;blog_title&amp;#8221; and &amp;#8220;datadir&amp;#8221; options at the bare minimum.&lt;/p&gt;
&lt;p&gt;Posts should go in the directory specified by the &amp;#8220;datadir&amp;#8221; option.  A post is a plain text file.  The first line is the title of the post, and the read of it will be the body.  You can place your posts in subdirectories which will show up on the site as categories.&lt;/p&gt;
&lt;p&gt;Go ahead and make a test post, then load up index.rbx in your browser,  the posts should show up.&lt;/p&gt;
&lt;p&gt;You can also create content pages,  define the &amp;#8220;pagedir&amp;#8221; option, and make your pages just like a blog post&amp;#8230; title on the first line and the rest of the file will be the body.  If you have pages, they will show up on the right hand side.&lt;/p&gt;
&lt;h2&gt;Advanced setup&lt;/h2&gt;
&lt;p&gt;In addition to the above, you can enable &amp;#8220;pretty links&amp;#8221; with the following .htaccess:&lt;/p&gt;
&lt;pre&gt;
DirectoryIndex index.rbx
&amp;lt;IfModule mod_rewrite.c&amp;gt;
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /index.rbx/$1 [L]
&amp;lt;/IfModule&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Instead of editing the index.rbx file directly, you can also create an options file named &amp;#8220;blog.conf.php&amp;#8221; in the same dir as index.html.  copy the @settings hash over removing the @.  The file should look like:&lt;/p&gt;
&lt;pre&gt;
settings = {

          :blog_title =&amp;gt; &quot;Blog Title&quot;,

          # What's this blog's description (for outgoing RSS feed)?
          :blog_description =&amp;gt; &quot;A Stream of Consciousness Blog&quot;,

          # What's this blog's primary language (for outgoing RSS feed)?
          :blog_language =&amp;gt; &quot;en&quot;,

          # Where are this blog's entries kept?
          :datadir =&amp;gt; &quot;/home/username/blogdata&quot;,

          #What directory will static pages be served from?

          :pagedir =&amp;gt; &quot;/home/username/pagedata&quot;,

          :pagevar =&amp;gt; &quot;pages&quot;,

          # What's my preferred base URL for this blog (leave blank for automatic)?
          :url =&amp;gt; &quot;http://www.mysite.com&quot;,

          # How many entries should I show on the home page?
          :num_entries =&amp;gt; 10,

          # What file extension signifies a blosxom entry?
          :file_extension =&amp;gt; &quot;txt&quot;,

          # What is the default flavour?
          :default_flavour =&amp;gt; &quot;html&quot;,

          :plugindir =&amp;gt; &quot;/home/username/plugins&quot;,
        
          :themedir =&amp;gt; &quot;/home/username/theme&quot;


        }

&lt;/pre&gt;
&lt;p&gt;This allows you to run multiple sites from the same index.rbx file and makes for easier upgrades when new versions are released.&lt;/p&gt;</body>
  <created-at type="datetime">2009-11-26T21:48:19-08:00</created-at>
  <id type="integer">122061</id>
  <permalink>setup</permalink>
  <repository-id type="integer">93145</repository-id>
  <title>Setup</title>
  <updated-at type="datetime">2009-02-18T11:38:31-08:00</updated-at>
  <user-id type="integer">41378</user-id>
</wiki>
