Process Flow - Index directive
Client requests URL
Check if URL is directory
Yes
Look for index files in order
Serve index file
No
Return directory listing or error
When a client requests a directory URL, nginx checks for index files in the order specified by the index directive and serves the first one found.