Autoindex

If Nginx cannot provide an index page for the requested directory, the default behavior is to return a 403 Forbidden HTTP error page. With the following set of directives, you enable an automatic listing of the files that are present in the requested directory:

Three columns of information appear for each file: the filename, the file date and time, and the file size in bytes:

Directive

Description

autoindex

Context: http, server, location

Enables or disables automatic directory listing for directories missing an index page.

Syntax: on or off

autoindex_exact_size

Context: http, server, location

If set to on, this ...

Get Nginx HTTP Server - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.