diff options
author | Badlop <badlop@process-one.net> | 2009-07-21 17:31:09 +0000 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2009-07-21 17:31:09 +0000 |
commit | 5346a7df024cabddf251174ad0c04b667e715ffe (patch) | |
tree | 7bc98d1da0d39ec90bce43a6a2c7bcb063da4d8c /doc/guide.html | |
parent | fix get_entity_subscriptions result match (diff) |
Allow content types to be configured in ejabberd.cfg (EJAB-975)(thanks to Brian Cully)
SVN Revision: 2376
Diffstat (limited to 'doc/guide.html')
-rw-r--r-- | doc/guide.html | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/doc/guide.html b/doc/guide.html index 2d1fb8eaa..13e104e96 100644 --- a/doc/guide.html +++ b/doc/guide.html @@ -2111,17 +2111,32 @@ Indicate one or more directory index files, similarly to Apache’s DirectoryIndex variable. When a web request hits a directory instead of a regular file, those directory indices are looked in order, and the first one found is returned. +</DD><DT CLASS="dt-description"><B><TT>content_types</TT></B></DT><DD CLASS="dd-description"> +Specify a mapping of extensions to content types. +There are several content types already defined, +with this option you can add new definitions, modify or delete existing ones. +To delete an existing definition, simply define it with a value: ‘undefined’. +</DD><DT CLASS="dt-description"><B><TT>default_content_type</TT></B></DT><DD CLASS="dd-description"> +Specify the content type to use for unknown extensions. +Default value is ‘application/octet-stream’. </DD></DL><P>This example configuration will serve the files from the local directory <CODE>/var/www</CODE> in the address <CODE>http://example.org:5280/pub/archive/</CODE>. +In this example a new content type <TT>ogg</TT> is defined, +<TT>png</TT> is redefined, and <TT>jpg</TT> definition is deleted. To use this module you must enable it: </P><PRE CLASS="verbatim">{modules, [ ... {mod_http_fileserver, [ {docroot, "/var/www"}, - {directory_indices, ["index.html", "main.htm"]}, - {accesslog, "/var/log/ejabberd/access.log"} + {accesslog, "/var/log/ejabberd/access.log"}, + {directory_indices, ["index.html", "main.htm"]}, + {content_types, [{".ogg", "audio/ogg"}, + {".png", "image/png"}, + {".jpg", undefined} + ]}, + {default_content_type, "text/html"} ] }, ... |