Ideal for shared hosting

Thu, 27 Aug 2009 , modified Fri, 18 Sep 2009

Bootylicious is ideal if you are still using shared hosting. It has only one dependency, consists of a one file that can be run as cgi script. I will explain more about apache configuration and setting everything up.

A standard Apache configuration might look like this:

    <VirtualHost *:80>

        ServerAdmin hostmaster@getbootylicious.org
        ServerName  getbootylicious.org
        ServerAlias www.getbootylicious.org

        SuexecUserGroup vti vti 

        DocumentRoot /var/www/getbootylicious.org/htdocs

        <Directory "/var/www/getbootylicious.org/htdocs/">
            Options Indexes FollowSymLinks

            Order allow,deny
            Allow from all
        </Directory>

        ScriptAlias /cgi-bin/ "/var/www/getbootylicious.org/cgi-bin/"

        <Directory "/var/www/getbootylicious.org/cgi-bin/">
            AllowOverride None
            Options ExecCGI None FollowSymLinks
            Order allow,deny
            Allow from all
        </Directory>

        ErrorLog  "/var/www/getbootylicious.org/log/errors_log"
        CustomLog "/var/www/getbootylicious.org/log/access_log" combined

    </VirtualHost>

Let assume that your shared hosting directory looks like mine:

    - /var/www/getbootylicious.org/
        - cgi-bin/
        - htdocs/

Let's prepare it for the bootylicious:

    - /var/www/getbootylicious.org/
        - articles/
            - 20090829T12:20:00-hello-world.pod
        - cgi-bin/
            - bootylicious/
                - bootylicious.conf
        - htdocs/
            - bootylicious/
                - themes/
                    - my-theme/
                        - my.css

Then we check out latest bootylicious git repository into cgi-bin/bootylicious and get bootylicious.pl script. This way we can address our blog like this:

    http://getbootylicious.org/cgi-bin/bootylicious/bootylicious.pl/articles/

But. We want it to look like this:

    http://getbootylicious.org/articles/

To do this we can use mod_rewrite Apache module. Just put .htaccess file into your public directory (htdocs in our case). It can look like this:

    AddDefaultCharset utf-8

    RewriteEngine on

    RewriteRule ^$ /cgi-bin/bootylicious/bootylicious.pl/ [L]
    RewriteRule ^/$ /cgi-bin/bootylicious/bootylicious.pl/ [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule ^(.*)$ /cgi-bin/bootylicious/bootylicious.pl/$1

Bootylicious configuration for this setup looks like this:

    {
        "base" : "/",
        "title" : "bootylicious",
        "descr" : "One-file blog engine software on Mojo steroids!",
        "author" : "vti",
        "articlesdir" : "../../articles",
        "publicdir" : "../../htdocs
    }

The base options is a hack to prevent construction links with a long /cgi-bin/.. prefix.

It's all ready now!

Plugins  | ArchiveLink posts »