Recall & Review
beginner
What is HTTP/2 and why is it important in web servers like nginx?
HTTP/2 is a newer version of the HTTP protocol that makes websites load faster by allowing multiple requests at the same time over one connection. It improves speed and efficiency compared to HTTP/1.1.
Click to reveal answer
beginner
How do you enable HTTP/2 in an nginx server block?
Add the keyword
http2 to the listen directive in your server block, for example: <br>listen 443 ssl http2;Click to reveal answer
intermediate
Why must SSL/TLS be enabled to use HTTP/2 in nginx?
Most browsers require HTTP/2 to run over a secure connection (HTTPS). So nginx must have SSL/TLS configured to use HTTP/2.
Click to reveal answer
intermediate
What is the purpose of the
ssl_certificate and ssl_certificate_key directives in nginx HTTP/2 configuration?They specify the paths to your SSL certificate and private key files. These files enable encrypted connections needed for HTTP/2.
Click to reveal answer
beginner
How can you verify that HTTP/2 is working on your nginx server?
Use browser developer tools or online tools to check the protocol used. You can also run
curl -I --http2 https://yourdomain.com to see if HTTP/2 is active.Click to reveal answer
Which directive enables HTTP/2 in an nginx server block?
✗ Incorrect
The correct way to enable HTTP/2 is by adding 'http2' to the listen directive, like 'listen 443 ssl http2;'.
Why is SSL/TLS required for HTTP/2 in nginx?
✗ Incorrect
Browsers require HTTP/2 to be used over HTTPS, so SSL/TLS must be enabled.
Which command can you use to check if your nginx server supports HTTP/2?
✗ Incorrect
The curl command with --http2 option checks if the server supports HTTP/2.
What files must be specified to enable SSL for HTTP/2 in nginx?
✗ Incorrect
The directives ssl_certificate and ssl_certificate_key specify the SSL certificate and key files.
What is a main benefit of HTTP/2 over HTTP/1.1?
✗ Incorrect
HTTP/2 allows multiplexing multiple requests on a single connection, improving speed.
Explain how to configure HTTP/2 in nginx including SSL setup.
Think about the server block and secure connection requirements.
You got /4 concepts.
Describe how you can verify that HTTP/2 is active on your nginx server.
Use simple command line tools or browser features.
You got /3 concepts.