Complete the code to enable gzip compression in nginx.
gzip [1];Setting gzip on; enables gzip compression in nginx, which reduces file sizes sent to clients.
Complete the code to set the Content-Encoding header for gzip compressed responses.
add_header Content-Encoding [1];The Content-Encoding header should be set to "gzip" to indicate gzip compression.
Fix the error in the gzip_types directive to compress CSS and JavaScript files.
gzip_types [1];The gzip_types directive expects space-separated MIME types without commas or semicolons.
Fill both blanks to set caching headers for static files to optimize delivery.
location /static/ {
expires [1];
add_header Cache-Control "[2]";
}Setting expires 30d; and Cache-Control "max-age=2592000"; tells browsers to cache static files for 30 days, improving load speed.
Fill all three blanks to configure gzip compression with minimum file size and buffer settings.
gzip on; gzip_min_length [1]; gzip_buffers [2] [3];
gzip_min_length 1000; sets minimum file size to compress. gzip_buffers 4 8k; sets buffer count and size for compression.