Complete the code to enable directory listing in an Nginx server block.
location /files/ {
[1] on;
}The autoindex directive enables directory listing in Nginx.
Complete the code to set the directory listing style to 'exact_size' in Nginx.
location /downloads/ {
autoindex on;
autoindex_format [1];
}The autoindex_format exact_size directive shows file sizes in bytes.
Fix the error in the Nginx config to enable directory listing inside the location block.
location /media/ {
autoindex [1];
}The correct value to enable autoindex is on.
Fill both blanks to configure Nginx to serve directory listing with exact file sizes.
location /public/ {
autoindex [1];
autoindex_format [2];
}Enable autoindex with on, set format to exact_size.
Fill both blanks to create a location block that enables directory listing and sets format to HTML.
location /assets/ {
autoindex [1];
autoindex_format [2];
}Enable directory listing with on, set format to html.
