# Extension configuration

Cherokee supports to define different behaviors based on the extension of the request. This feature is commonly used to configure the scripting languages.

This kind of entries accept all the options described in the Behavior configuration chapter: Handler, DocumentRoot, Auth, Allow From and OnlySecure.

### Examples

#### Common PHP extension configuration

For example, in the case of PHP:

    Extension php, php3, php4 {
        Handler phpcgi
    }

#### Protected ISO images

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
            }
        }
    }