mod_http_files
Using mod_http_files you can serve static files from a folder.
This module is not used for sharing files between XMPP clients. For this see mod_http_file_share.
Details
mod_http_files implements RFC 2616.
Usage
= {
modules_enabled -- Other modules
"http_files"; -- Load mod_http_files
}
= "/var/www" -- Point it to a path to serve http_files_dir
Files in the http_files_dir
must be readable by the user
Prosody runs as (commonly prosody
).
A HTML file at /var/www/index.html
should show up at
https://prosody.example:5281/files/
.
Configuration
Option | Default | Notes |
---|---|---|
http_files_dir | Required option | The base file directory. |
http_index_files | { "index.html", "index.htm" } |
A request for a directory will serve one of these files if the directory contains it |
http_dir_listing | false |
Whether to allow a module to create a file listing of directories where no index file is found |
mime_types_file | "/etc/mime.types" |
A file containing MIME types and the file extensions used by it. |
http_files_cache_max_file_size | 4096 |
Max file size for in-memory cache. |
Also see options common to all HTTP modules.
Example
= {
modules_enabled -- Other modules
"http_files"; -- Load mod_http_files
}
= "/var/www" -- Point it to a path to serve http_files_dir
Now you should be able to point your browser at
https://prosody.example:5281/files/
.