0
0
Nginxdevops~10 mins

Let's Encrypt with Certbot in Nginx - Interactive Code Practice

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

Complete the command to install Certbot on Ubuntu.

Nginx
sudo apt-get install [1]
Drag options to blanks, or click blank then click option'
Acertbot
Bnginx
Cdocker
Dmysql
Attempts:
3 left
💡 Hint
Common Mistakes
Installing nginx instead of certbot.
Trying to install unrelated packages like docker or mysql.
2fill in blank
medium

Complete the command to obtain a certificate for example.com using Certbot with nginx plugin.

Nginx
sudo certbot --[1] nginx -d example.com
Drag options to blanks, or click blank then click option'
Arenew
Bnginx
Crun
Dcertonly
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'renew' when you want to get a new certificate.
Using 'certonly' which does not install the certificate automatically.
3fill in blank
hard

Fix the error in the nginx server block to enable SSL by completing the directive.

Nginx
listen 443 ssl [1];
Drag options to blanks, or click blank then click option'
Ahttp2
Bproxy_pass
Cserver_name
Droot
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'proxy_pass' which is for reverse proxy settings.
Using 'server_name' or 'root' which are unrelated here.
4fill in blank
hard

Fill both blanks to configure Certbot to automatically renew certificates and reload nginx after renewal.

Nginx
0 3 * * * certbot renew --[1]-hook "systemctl [2] nginx"
Drag options to blanks, or click blank then click option'
Apost
Brestart
Creload
Dpre
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pre-hook' which runs before renewal.
Using 'restart' which causes downtime.
5fill in blank
hard

Fill all three blanks to create a secure nginx server block snippet for SSL with Let's Encrypt certificates.

Nginx
server {
    listen 443 ssl [1];
    server_name [2];
    ssl_certificate /etc/letsencrypt/live/[3]/fullchain.pem;
}
Drag options to blanks, or click blank then click option'
Ahttp2
Bexample.com
Cmydomain.com
Ddefault
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'default' as server_name which is not a domain.
Mismatching domain names in server_name and certificate path.