Configure NGINX to use SSL certificate
in 6 steps
Edited June 07, 2024
After setting up your NGINX server, open the Bash and...
$ sudo apt-get update
$ sudo apt-get install certbot python3-certbot-nginx
Remember, it can also be a subdomain. If you want to include more than one domain, use the -d
option before each one:
$ sudo certbot --nginx -d your-domain.com -d www.your-domain.com -d sub.your-domain.com
Follow the interactive instructions to set up Certbot. After that:
$ sudo nginx -t
$ sudo systemctl restart nginx
To renew automatically after 90 days:
$ sudo certbot renew --quiet
Done.