0
0
Nginxdevops~10 mins

Default type handling in Nginx - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the default MIME type to text/plain.

Nginx
default_type [1];
Drag options to blanks, or click blank then click option'
Aapplication/json
Btext/html
Ctext/plain
Dapplication/octet-stream
Attempts:
3 left
💡 Hint
Common Mistakes
Using a MIME type that is not plain text like application/json.
Forgetting the semicolon at the end of the directive.
2fill in blank
medium

Complete the code to disable the default MIME type by setting it to an empty value.

Nginx
default_type [1];
Drag options to blanks, or click blank then click option'
Anone
B'';
Coff
D''
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'none' or 'off' which are not valid values for this directive.
Including the semicolon inside the quotes.
3fill in blank
hard

Fix the error in the code to correctly set the default MIME type to application/octet-stream.

Nginx
default_type [1];
Drag options to blanks, or click blank then click option'
Aapplication/octet-stream;
Bapplication/octet-stream
Attempts:
3 left
💡 Hint
Common Mistakes
Including the semicolon inside the value string.
Omitting the semicolon at the end of the directive.
4fill in blank
hard

Fill both blanks to set the default MIME type to text/html and enable gzip compression.

Nginx
default_type [1];
gzip [2];
Drag options to blanks, or click blank then click option'
Atext/html
Bon
Coff
Dapplication/json
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'off' for gzip when compression is desired.
Setting default_type to a non-HTML MIME type.
5fill in blank
hard

Fill all three blanks to set the default MIME type to application/json, disable gzip, and set the server listen port to 8080.

Nginx
default_type [1];
gzip [2];
listen [3];
Drag options to blanks, or click blank then click option'
Atext/plain
Boff
C8080
Dapplication/json
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing 'on' and 'off' for gzip directive.
Using the wrong port number for listen.
Setting default_type to a text MIME type instead of JSON.