http-fancyindex #
Replaces the built-in autoindex with a richer, themeable directory listing — supports CSS, custom header/footer, sorting, human-readable sizes and localised timestamps.
Source: upstream source
Directives
fancyindex #
syntax: fancyindex on | off (on/off flag); · context: http, server, location
Requirements ============ CentOS, RHEL, Fedora Linux ~~~~~~~~~~~~~~~~~~~~~~~~~~ For users of the official stable <https://www.nginx.com/resources/wiki/start/topics/tutorials/install/>__ Nginx repository, extra packages repository with dynamic modules <https://www.getpagespeed.com/redhat>__ is available and fancyindex is included.
fancyindex_case_sensitive #
syntax: fancyindex_case_sensitive on | off (on/off flag); · context: http, server, location
Boolean directive — set to "on" or "off".
fancyindex_css_href #
syntax: fancyindex_css_href on | off (string); · context: http, server, location
If disabled, directories are sorted together with files. fancyindex_css_href ~~~~~~~~~~~~~~~~~~~ :Syntax: fancyindex_css_href uri :Default: fancyindex_css_href "" :Context: http, server, location :Description: Allows inserting a link to a CSS style sheet in generated listings.
fancyindex_default_sort #
syntax: fancyindex_default_sort 1 arg (enum); · context: http, server, location
Pick one of an enumerated set of values.
fancyindex_directories_first #
syntax: fancyindex_directories_first on | off (on/off flag); · context: http, server, location
If disabled, case will be ignored when sorting by name. fancyindex_directories_first ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Syntax: fancyindex_directories_first [on | off] :Default: fancyindex_directories_first on :Context: http, server, location :Description: If enabled (default setting), groups directories together and sorts them before all regular files.
fancyindex_exact_size #
syntax: fancyindex_exact_size on | off (on/off flag); · context: http, server, location
Boolean directive — set to "on" or "off".
fancyindex_header #
syntax: fancyindex_header 1 arg; · context: http, server, location
If you feel like external header/footer is a must-have for you, please let me know <mailto:aperez@igalia.com>__. fancyindex_header ~~~~~~~~~~~~~~~~~ :Syntax: fancyindex_header path [subrequest | local] :Default: fancyindex_header "" :Context: http, server, location :Description: Specifies which file should be inserted at the head of directory listings.
fancyindex_hide_parent_dir #
syntax: fancyindex_hide_parent_dir on | off (on/off flag); · context: http, server, location
Boolean directive — set to "on" or "off".
fancyindex_hide_symlinks #
syntax: fancyindex_hide_symlinks on | off (on/off flag); · context: http, server, location
Boolean directive — set to "on" or "off".
fancyindex_ignore #
syntax: fancyindex_ignore 1+ args; · context: http, server, location
Normal convention is to hide these. fancyindex_ignore ~~~~~~~~~~~~~~~~~ :Syntax: fancyindex_ignore string1 [string2 [... stringN]] :Default: No default. :Context: http, server, location :Description: Specifies a list of file names which will not be shown in generated listings.
fancyindex_localtime #
syntax: fancyindex_localtime on | off (on/off flag); · context: http, server, location
Boolean directive — set to "on" or "off".
fancyindex_show_dotfiles #
syntax: fancyindex_show_dotfiles on | off (on/off flag); · context: http, server, location
Boolean directive — set to "on" or "off".
fancyindex_show_path #
syntax: fancyindex_show_path on | off (on/off flag); · context: http, server, location
Boolean directive — set to "on" or "off".
fancyindex_time_format #
syntax: fancyindex_time_format on | off (string); · context: http, server, location
Default is “off” (GMT time). fancyindex_time_format ~~~~~~~~~~~~~~~~~~~~~~ :Syntax: fancyindex_time_format string :Default: fancyindex_time_format "%Y-%b-%d %H:%M" :Context: http, server, location :Description: Format string used for timestamps.
Example
location / {
fancyindex on;
fancyindex_exact_size off;
fancyindex_name_length 64;
fancyindex_default_sort name;
fancyindex_directories_first on;
fancyindex_localtime on;
fancyindex_header "/.fancyindex/header.html";
fancyindex_footer "/.fancyindex/footer.html";
}