Project

General

Profile

Docs ModMimeMagic » History » Revision 2

Revision 1 (qhy, 2010-04-07 05:53) → Revision 2/5 (qhy, 2010-04-07 05:54)

h1. Module mod_mimemagic - Determines the MIME type of a file by looking at a few bytes of its contents 

 *Module: mod_mimemagic* 

 h2. Description 
 This module determines the MIME type of files in the same way the Unix file(1) command works: it looks at the first few bytes of the file. mod_mimemagic.c is based on mod_mime_magic.c of httpd 2.0. 

 h2. Installation 

 This module is a 3rd party module and is not included in the official distribution. You can download the patch from here: 

 * source: http://code.google.com/p/lighttpd-improved/source/browse/trunk/src/mod_mimemagic.c 
 * Patch For lighttpd 1.4.26: http://lighttpd-improved.googlecode.com/files/lighttpd-1.4.26-mod_mimemagic.patch 

 h2. Options 

 *mimemagic.file* 
 path of magic.mime file. can use same magic file of httpd server 

 e.g.: 
 mimemagic.file = "/etc/httpd/conf/magic" 

    Default: not set 

 *mimemagic.override-global-mimetype* 
 By default mod_mimemagic only process files which extensions aren't covered by mime.type setting. 
 If you want to override global mime.type, set mimemagic.override-global-mimetype to "enable" 

 e.g.: 
 mimemagic.override-global-mimetype = "enable" 

    Default: disable