CakePHP and Cherokee

Getting CakePHP working with cherokee is really simple:

First put your CakePHP files into any directory. For me it’s /home/daniel/Web/dcms.

You can delete all the .htaccess files:

/.htaccess
/app/.htaccess
/app/webroot/.htaccess

Add a new virtual host to cherokee, set the document root to the CakePHP
webroot: /home/daniel/Web/dcms/app/webroot. Directory Indexes should be set to index.php.

Add a new PHP rule - with the new wizard it’s really simple - and keep
the default settings. Add a new ‘file exists’ rule and let it match ‘Any File’ and handle it as ‘Static Content’.

Cherokee matching rules

Cherokee handlers

How we need to modify the default rule. Change the handler to
‘Redirection’ and setup the regex like this:

Cherokee handlers default rule

(Internal, ^.\*$, index.php)

That’s it!

Just make sure that the rules are in the correct order (php, any file,
default):

Cherokee rule overview

Just save and access CakePHP via your defined domain.

CakePHP index page

 
0
Kudos
 
0
Kudos

Now read this

Using Jinja2 with Django

In the last days I tried to get Jinja2 working with Django. Here I want to explain a bit about the integration progress. First we need to install django and jinja2, but I won’t explain it in here, just use easy_install. After installing... Continue →