Nav

Projects

Posts

Crawwwl

Ceci n'est pas un blog. Any resemblance to a blog or other media living or dead is purely coincidental.

Sinatra was used
To make this site and others.
Read about it here

My low traffic sites
Led me to share RAM using
Phusion Passenger

Below are some examples of the configuration files used to setup Sinatra on Passenger

My directory structure looks like this:

    /var/www/blog
      |
      +-- config.ru
      |
      +-- blog.rb
      |
      +-- public/
      |
      +-- tmp/
      |
      +-- views/
  

My /etc/apache2/conf.d/blog.conf:

    <Directory "/var/www/blog">
      Options Indexes FollowSymLinks +ExecCGI
    </Directory>

    AddHandler cgi-script .cgi

    <VirtualHost *:80>
        ServerName http://crawwwl.com
        DocumentRoot /var/www/blog/public
    </VirtualHost>
  

And finally, my config.ru file:

    require 'rubygems'
    require 'sinatra'

    require 'blog'
    run Sinatra::Application
  

And that's all you need.
To find out more you can check:
The Sinatra "Book"