0
0
Nginxdevops~20 mins

HTTP/2 configuration in Nginx - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
HTTP/2 Nginx Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
1:30remaining
Check if HTTP/2 is enabled on Nginx
You run the command curl -I --http2 https://example.com on a server with Nginx configured. What output line confirms HTTP/2 is enabled?
AHTTP/2 200
BHTTP/1.1 200 OK
CHTTP/3 200
DHTTP/1.0 200 OK
Attempts:
2 left
💡 Hint
Look for the HTTP version in the response headers.
Configuration
intermediate
1:30remaining
Enable HTTP/2 in Nginx server block
Which Nginx server block directive correctly enables HTTP/2 for HTTPS?
Alisten 443 ssl http2;
Blisten 443 ssl;
Clisten 443 http2;
Dlisten 80 http2;
Attempts:
2 left
💡 Hint
HTTP/2 requires SSL and the correct listen directive.
Troubleshoot
advanced
2:00remaining
Why is HTTP/2 not working despite configuration?
You configured Nginx with listen 443 ssl http2; but HTTP/2 is not working. Which is the most likely cause?
ANot setting server_name directive
BUsing port 80 instead of 443
CNot enabling gzip compression
DMissing valid SSL certificate and key files
Attempts:
2 left
💡 Hint
HTTP/2 requires a secure connection.
Best Practice
advanced
2:00remaining
Recommended TLS versions for HTTP/2 in Nginx
Which TLS versions should you enable in Nginx to support HTTP/2 securely?
ATLSv1.0, TLSv1.1, TLSv1.2
BTLSv1.0 and TLSv1.1 only
CTLSv1.2 and TLSv1.3 only
DSSLv3 and TLSv1.2
Attempts:
2 left
💡 Hint
Older TLS versions are insecure and not recommended.
🔀 Workflow
expert
2:30remaining
Order steps to enable HTTP/2 on Nginx with SSL
Put these steps in the correct order to enable HTTP/2 on an Nginx server with SSL:
A2,1,4,3
B1,4,2,3
C1,2,4,3
D4,1,2,3
Attempts:
2 left
💡 Hint
Think about getting certificates before configuring paths.