A. Missing semicolon after ssl_certificate directive
B. Wrong file path for ssl_certificate_key
C. ssl_certificate_key directive is misspelled
D. ssl_certificate directive should not have a file path
Solution
Step 1: Check syntax for each directive
Each nginx directive must end with a semicolon. The first line lacks a semicolon.
Step 2: Verify other parts
The file paths and directive names are correct, only the missing semicolon causes a syntax error.
Final Answer:
Missing semicolon after ssl_certificate directive -> Option A
Quick Check:
Every directive ends with ; [OK]
Hint: Always end nginx directives with a semicolon [OK]
Common Mistakes:
Forgetting semicolons at line ends
Assuming file paths are incorrect without checking
Misspelling directive names
5. You want to configure nginx to use a strong cipher suite and only TLS 1.3. Which configuration snippet achieves this securely?
hard
A. ssl_protocols TLSv1.2;
ssl_ciphers 'TLS_AES_128_GCM_SHA256';
B. ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers 'HIGH:!aNULL:!MD5';
C. ssl_protocols TLSv1.3;
ssl_ciphers 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256';
D. ssl_protocols TLSv1.3;
ssl_ciphers 'ALL';
Solution
Step 1: Select TLS version
Only TLS 1.3 is allowed by ssl_protocols TLSv1.3;, matching the requirement.
Step 2: Choose strong cipher suites
ssl_ciphers 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256'; uses strong TLS 1.3 ciphers explicitly. Other options either allow older TLS versions, use insecure cipher lists, or use generic 'ALL' which is insecure.
Final Answer:
ssl_protocols TLSv1.3; ssl_ciphers 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256'; -> Option C