Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to set the default index file to index.html.
Nginx
index [1]; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a file name that is not commonly used as an index file.
Forgetting the semicolon at the end.
✗ Incorrect
The
index directive specifies the default file served when a directory is requested. index.html is the common default.2fill in blank
mediumComplete the code to set multiple index files: index.php and index.html.
Nginx
index [1] [2];
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect file names.
Not separating file names with spaces.
✗ Incorrect
You can specify multiple index files separated by spaces. Nginx will try them in order.
3fill in blank
hardFix the error in the code to correctly set the index file to home.html.
Nginx
index [1]; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting the semicolon at the end.
Using wrong file extension.
✗ Incorrect
The
index directive must end with a semicolon. Without it, the configuration is invalid.4fill in blank
hardFill both blanks to set the index files to default.html and index.htm.
Nginx
index [1] [2];
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up file names or extensions.
Forgetting the semicolon at the end.
✗ Incorrect
You can list multiple index files. Here,
default.html is first, then index.htm.5fill in blank
hardFill all three blanks to set the index files to main.php, index.html, and default.htm.
Nginx
index [1] [2] [3];
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Incorrect file order.
Using wrong file extensions.
Missing semicolon.
✗ Incorrect
You can specify multiple index files in order. Nginx tries each until it finds one.