0
0
Nginxdevops~10 mins

HTTP/2 configuration in Nginx - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to enable HTTP/2 in the server block.

Nginx
listen 443 ssl [1];
Drag options to blanks, or click blank then click option'
Aspdy
Bhttp2
Cssl
Ddefault_server
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'spdy' which is deprecated.
Forgetting to add any keyword after the port.
Adding 'ssl' again which is redundant.
2fill in blank
medium

Complete the code to specify the SSL certificate file path.

Nginx
ssl_certificate [1];
Drag options to blanks, or click blank then click option'
A/etc/nginx/ssl/server.crt
B/etc/nginx/ssl/dhparam.pem
C/etc/nginx/ssl/ca.crt
D/etc/nginx/ssl/server.key
Attempts:
3 left
💡 Hint
Common Mistakes
Using the private key file path instead of the certificate.
Using the CA certificate file which is different.
Using the Diffie-Hellman parameter file.
3fill in blank
hard

Fix the error in the listen directive to properly enable HTTP/2.

Nginx
listen 443 ssl [1];
Drag options to blanks, or click blank then click option'
Ahttp/2
Bhttp_2
Chttp2
Dhttp-2
Attempts:
3 left
💡 Hint
Common Mistakes
Using slashes or dashes in the keyword.
Using underscores instead of no separator.
Misspelling the keyword.
4fill in blank
hard

Fill both blanks to complete the SSL configuration for HTTP/2 support.

Nginx
listen 443 ssl [1];
ssl_certificate [2];
Drag options to blanks, or click blank then click option'
Ahttp2
B/etc/nginx/ssl/server.key
C/etc/nginx/ssl/server.crt
Ddefault_server
Attempts:
3 left
💡 Hint
Common Mistakes
Using the private key file path for ssl_certificate.
Forgetting to add http2 in listen directive.
Using 'default_server' instead of 'http2'.
5fill in blank
hard

Fill all three blanks to complete the secure server block with HTTP/2 enabled.

Nginx
server {
    listen 443 ssl [1];
    ssl_certificate [2];
    ssl_certificate_key [3];
}
Drag options to blanks, or click blank then click option'
Ahttp2
B/etc/nginx/ssl/server.crt
C/etc/nginx/ssl/server.key
Ddefault_server
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up certificate and key file paths.
Omitting http2 in the listen directive.
Using 'default_server' instead of 'http2'.