February 2018
Beginner to intermediate
348 pages
9h 40m
English
The Index module provides a simple directive named index, which lets you define the page that Nginx will serve by default if no filename is specified in the client request (in other words, it defines the website index page). You may specify multiple filenames; the first file to be found will be served. If none of the specified files are found, Nginx will either attempt to generate an automatic index of the files, if the autoindex directive is enabled (check the HTTP autoindex module), or return a 403 Forbidden error page.
Optionally, you may insert an absolute filename (such as /page.html), but only as the last argument of the directive.
Syntax: index file1 [file2...] [absolute_file];
Default value: index.html
index index.php index.html ...