Cherokee Web Server: Extension configuration

Extension configuration

Cherokee supports to define different behaviors based on the extension of the request. It accepts the same options as a Directory configuration entry. This feature is commonly used to configure the scripting languages.


For example, in the case of PHP:

Extension php, php3, php4 {
    Handler phpcgi
}


Lets imagine we want require a valid login/password pair to download *.iso files.

Extension iso {
    Auth Basic, Digest {
        Name "ISO image files"
        Method plain {
            PasswdFile /var/www/isos/.plain_passwds
        }
    }
}