Cherokee Web Server: Common behavior

Common behavior

The common handler implements the most common behavior on a web server.


It depends on the File sending and the Directory listing handlers. If the user requests a directory, it is going to list its contents, but if the request if the a file, it will perform the appropiate task with it, usually send or execute it.

Parameters

It relays on the rest of the server handlers, so it accepts all its parameters, and it will use the appropiate parameters in each case. The only parameter it accepts for itself is:

By default it will use an internal I/O cache to improve the server performance. If you don't want to use it with a directory just unset it using this parameter.

Examples

This example sets the directory download up to allow everyone to browse its contents and download anything they want to.

Directory /download {
   Handler common
}


This example specifies two parameter:

Directory /download {
   Handler common {
       HeaderFile /var/www/README
   }
}

if the server accepts a request of a directory inside this section, it will use the HeaderFile paramter (note it is a Directory listing handler option). In the case the request is targeting a file, it will use the File sending handler, so it will ignore the parameter.