0
0
Nginxdevops~10 mins

Gzip configuration (types, min_length) 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 enable gzip compression in nginx.

Nginx
gzip [1];
Drag options to blanks, or click blank then click option'
Aon
Boff
Cenable
Dtrue
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'enable' instead of 'on'
Using 'true' instead of 'on'
2fill in blank
medium

Complete the code to set the minimum length of a response to be gzipped to 1000 bytes.

Nginx
gzip_min_length [1];
Drag options to blanks, or click blank then click option'
A2000
B1500
C500
D1000
Attempts:
3 left
💡 Hint
Common Mistakes
Setting too low a value like 500
Using values larger than needed
3fill in blank
hard

Fix the error in the gzip_types directive to include correct MIME types.

Nginx
gzip_types [1];
Drag options to blanks, or click blank then click option'
Atext/plain text/css application/json
Btext/plain, text/css, application/json
Ctext/plain; text/css; application/json
Dtext/plain|text/css|application/json
Attempts:
3 left
💡 Hint
Common Mistakes
Using commas or semicolons between MIME types
Using pipes '|' as separators
4fill in blank
hard

Fill both blanks to set gzip compression for JSON and JavaScript files with a minimum length of 512 bytes.

Nginx
gzip_types [1];
gzip_min_length [2];
Drag options to blanks, or click blank then click option'
Aapplication/json application/javascript
Bapplication/json, application/javascript
C512
D1024
Attempts:
3 left
💡 Hint
Common Mistakes
Using commas in MIME types
Setting min_length too high
5fill in blank
hard

Fill all three blanks to enable gzip, set minimum length to 256 bytes, and compress HTML and CSS files.

Nginx
gzip [1];
gzip_min_length [2];
gzip_types [3];
Drag options to blanks, or click blank then click option'
Aon
B256
Ctext/html text/css
Doff
Attempts:
3 left
💡 Hint
Common Mistakes
Disabling gzip accidentally
Using commas in MIME types
Setting min_length too high