Challenge 2: Directory Index Order When Only One Candidate Exists — Solution Walkthrough What actually gets served: index.php gets served. Even though the configured index list is "index.html index.php" — meaning index.html is checked first — the server only serves whichever candidate actually exists in that directory. Since index.html isn't present at all, the server moves on to the next candidate in the list, index.php, finds it, and serves that instead. Why the order still matters, even here: The order determines *priority* among files that exist, not merely which files are eligible. If this directory had contained both index.html and index.php, the server would have served index.html specifically because it's listed first — index.php would have been ignored entirely in that case, regardless of which file might have been more "correct" to serve. The order only becomes visible in this particular exercise because there's no conflict to resolve — but it's exactly the mechanism that would decide the outcome if both files existed side by side. WHY THIS WORKS AS AN ANSWER ------------------------------ This exercise checks that the directory-index mechanism from this chapter is understood as "check candidates in order, serve the first one that exists" rather than "always serve the first item in the list regardless of whether it exists" — correctly explaining why the list's order still matters, even in a case where only one candidate happens to be present.