0
0
Nginxdevops~10 mins

Proxy cache path configuration 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 define the cache path directory.

Nginx
proxy_cache_path /var/cache/nginx/[1] levels=1:2 keys_zone=my_cache:10m max_size=1g inactive=60m use_temp_path=off;
Drag options to blanks, or click blank then click option'
Acache
Btemp
Clogs
Dhtml
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'temp' or 'logs' which are not standard cache directories.
Leaving the directory name empty.
2fill in blank
medium

Complete the code to set the cache zone name.

Nginx
proxy_cache_path /var/cache/nginx/cache levels=1:2 keys_zone=[1]:10m max_size=1g inactive=60m use_temp_path=off;
Drag options to blanks, or click blank then click option'
Azone1
Btemp_zone
Ccache_zone
Dmy_cache
Attempts:
3 left
💡 Hint
Common Mistakes
Using names with spaces or special characters.
Using generic names like 'temp_zone' that don't reflect cache.
3fill in blank
hard

Fix the error in the cache levels configuration.

Nginx
proxy_cache_path /var/cache/nginx/cache levels=[1] keys_zone=my_cache:10m max_size=1g inactive=60m use_temp_path=off;
Drag options to blanks, or click blank then click option'
A1,2
B2:3
C1:2
D1-2
Attempts:
3 left
💡 Hint
Common Mistakes
Using commas or dashes instead of colons.
Using only one number without colon.
4fill in blank
hard

Fill both blanks to configure cache size and inactive time.

Nginx
proxy_cache_path /var/cache/nginx/cache levels=1:2 keys_zone=my_cache:10m max_size=[1] inactive=[2] use_temp_path=off;
Drag options to blanks, or click blank then click option'
A500m
B60m
C1g
D30m
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up max_size and inactive values.
Using invalid units or no units.
5fill in blank
hard

Fill all three blanks to complete the proxy_cache_path with temp path usage off.

Nginx
proxy_cache_path /var/cache/nginx/cache levels=[1] keys_zone=[2]:10m max_size=[3] inactive=60m use_temp_path=off;
Drag options to blanks, or click blank then click option'
A1:2
Bmy_cache
C1g
D2:3
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong levels format like '2:3' when '1:2' is standard.
Using incorrect keys_zone names.
Setting max_size without units.