Cherokee Web Server: File sending

File sending

The only purpose of the file handler is to send files. No more, no less.

Parameters

The file handler doesn't accept parameters.

Examples

Let imagine your DocumentRoot points to /var/www.

Directory /images {
    Handler file
}

This configuration will make Cherokee to serve files inside /var/www/images like files.


You could also define another DocumentRoot for a certain directory entry.
The next configuration example is very common in Mailman (http://www.list.org) installations:

Directory /images/mailman {
    Handler file
    DocumentRoot /usr/share/images/mailman/
}

On http://www.example.com/images/mailman/mailman.jpg request it will send: /usr/share/images/mailman/mailman.jpg