fancyindex_show_path

The directive `fancyindex_show_path` controls whether the path of the directory being indexed is displayed in the listing.

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

Description

The fancyindex_show_path directive from the NGINX Fancy Index module allows you to toggle the visibility of the directory path in the generated index listing. When enabled, the full path of the directory being indexed is displayed at the top of the index page, providing users with context about their current location within the file structure.

This directive can accept a boolean flag as an argument. If set to 'on', the path will be shown; if set to 'off', it will be hidden. This is particularly useful in scenarios where cleaner output is desired or when the directory path might contain sensitive information that should not be exposed to users. It can be set in various contexts, including http, server, and location, giving you flexibility in where you want this behavior to apply in your NGINX configuration.

Moreover, the integration with the Fancy Index module means that other options for customizing the appearance of the index listing can complement the behavior of this directive, allowing for a highly personalized directory browsing experience.

Config Example

location /downloads {
    fancyindex on;
    fancyindex_show_path on;
}

Ensure that the Fancy Index module is properly installed and loaded in NGINX, otherwise this directive will not have any effect.

If set to 'on', be cautious of exposing sensitive directory paths to users.

← Back to all directives