This icon is part of the GNOME project, licensed under the GPLv2.

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.


Claromes


Comments? Ping me on Mastodon or Matrix
Tags: nginx · ssl · bash · english
Share: Mastodon · Bluesky · Órbita · Hacker News · Email