Cherokee Web Server: Mime types configuration

Mime types configuration

The pourpose of this configuration file is to associate file extensions with its common MIME type. It also allows to assign an expiration time to each MIME type in order to prevent some file kinds to be cache on proxy caches for too long.

The default path to this file is: /etc/cherokee/mime.conf


Examples

This entry assoate the most common JPEG extension to its MIME type.

image/jpeg { 
    suffixes jpg, jpeg, jpe, jfif 
}


The following example sets the HTML type, and set the cache expiration time in 1 hour, which means that if a proxy has cached a html file from the server, it must expire in no longer than 1 hour.

text/html { 
    suffixes suffixes htm, html
    max-age 3600
}

NOTE: The time has to be specified in seconds.