Fork-CMS and Lighttpd

Fork-CMS is a young open source content management system which can be found at http://www.fork-cms.com/

The day this is posted, Fork will only work completely out of the box if you use Apache as your webserver.

This is due to the fact that Fork needs to tell Apache through a .htaccess file to be treated specially in order to use prettier URLs.

For everything to work properly in Lighttpd, one must add some directives into Lighttpds configuration to obtain the same result.

Here is a sample configuration

server.modules = (
            "mod_simple_vhost",
            "mod_rewrite",
            ...
)
...
## Fork-CMS
$HTTP["host"] == "mydomain.com" {
    simple-vhost.server-root   = "/var/www/mydomain.com/forkcms"
    simple-vhost.document-root = "/default_www/"
    dir-listing.activate = "disable"
    url.rewrite = (
        "^/(.*)\.(.+)$" => "$0",
        "^/(.+)/?$" => "/index.php/$1"
    )
}

Here I’ve used a vHost because Fork needs to rewrite its URLs using the  root folder of your webserver as its root path, but because Fork is placed inside a subfolder, it needs to be tricked. Using vHosts will tell Lighttpd to treat a folder as a root folder for a certain domain name.

These are the minimal requirements to have Fork-CMS set up and functioning properly as it’s supposed to with regards to configuring Lighttpd as your webserver.

Additional configuration options can be added to Lighttpds configuration file to approximate the behaviour under Apache with regards to caching and compressing and so on.

Advertisements

Fork-CMS: can’t load /private /blog…

If you’re giving  Fork-CMS a try (which can be found at www.fork-cms.be), and are experiencing problems loading a lot of different pages, it might be because your Apache ignores the special .htaccess file the folks at Fork made to make some magic work.

To make sure Apache looks into that file, you need to add the directive “AllowOverride All“, and restart Apache.