mod_http_files

Using mod_http_files you can serve static files from a folder.

Details

mod_http_files implements RFC 2616.

Usage

    modules_enabled = {
        -- Other modules
        "http_files"; -- Load mod_http_files
    }

Configuration

Option Default Notes
http_files_dir nil The base file directory. You must set this to serve files
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.

Example

    modules_enabled = {
        -- Other modules
        "http_files"; -- Load mod_http_files
    }
 
    http_files_dir = "/var/www" -- Point it to a path to serve

Now you should be able to point your browser at http://prosody.example:5280/files/.