fancyindex_hide_symlinks

The `fancyindex_hide_symlinks` directive controls the visibility of symbolic links in directory listings generated by the NGINX Fancy Index module.

Syntaxfancyindex_hide_symlinks on | off;
Defaultoff
Contexthttp, server, location
Argumentsflag

Description

The fancyindex_hide_symlinks directive is part of the NGINX Fancy Index module, which enhances the default directory listing by allowing for customizations such as headers, footers, and styles while displaying files within a directory. This specific directive adds a layer of control regarding the display of symbolic links within these listings. By setting this directive to on, symbolic links will be hidden from the output, thereby providing a cleaner and potentially less confusing view for users who browse the directory.

When fancyindex_hide_symlinks is enabled, the server will filter out any symbolic links when generating the output for directory listings. This is particularly useful in scenarios where the presence of symbolic links might lead to security concerns or simply clutter the display with links that point to less relevant resources. Conversely, setting this directive to off will ensure that symbolic links remain visible, which might be desirable in cases where the links provide essential navigation assistance or information about the directory structure.

This directive is flexible in terms of application, as it can be placed within the http, server, or location contexts, allowing administrators to apply it at various levels of the configuration hierarchy, depending on their specific needs for directory listings in different areas of their web structure.

Config Example

location /files {
    fancyindex on;
    fancyindex_hide_symlinks on;
}

Ensure that the directive is set in the correct context (http, server, or location); incorrect placement will lead to unexpected results.

Using fancyindex_hide_symlinks on may not be suitable if users require access to specific symbolic links for navigation.

← Back to all directives