The try_files directive try_files documented here .
It specifically documents two elements of the file: $uri and $uri/ . The first tests for the presence of normal files, and the second - the presence of directories.
The index directive is called as a result of processing a URI that points to a directory that contains a file that matches one of the directive parameters.
In case of try_files $uri /test.html; the existence of the directory is not verified, and therefore the default action is performed.
In case of try_files $uri $uri/ /test.html; the existence of the directory is checked and, therefore, the index action is performed.
source share