certbot自动在ubuntu16.04的nginx上部署let's encrypt免费ssl证书

简介: 版权声明:本文可能为博主原创文章,若标明出处可随便转载。 https://blog.
版权声明:本文可能为博主原创文章,若标明出处可随便转载。 https://blog.csdn.net/Jailman/article/details/79136172

终结CA收费时代,让互联网更安全


Install

On Ubuntu systems, the Certbot team maintains a PPA. Once you add it to your list of repositories all you'll need to do is apt-get the following packages.

$ sudo apt-get update
$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:certbot/certbot
$ sudo apt-get update
$ sudo apt-get install python-certbot-nginx 

Get Started

Certbot has an Nginx plugin, which is supported on many platforms, and certificate installation.

Due to a security issue, Let's Encrypt has stopped offering the mechanism that the Nginx plugin previously used to prove you control a domain. You can read more about this here.

We are planning on releasing a new version of Certbot in the next few days that works around this but if you have to obtain a certificate and cannot wait, you have a couple of options. If you're serving files for that domain out of a directory on that server, you can run the following command:

$ sudo certbot --authenticator webroot --installer nginx

If you're not serving files out of a directory on the server, you can temporarily stop your server while you obtain the certificate and restart it after Certbot has obtained the certificate. This would look like:

$ sudo certbot --authenticator standalone --installer nginx --pre-hook "nginx -s stop" --post-hook "nginx"

Running either of these commands will get a certificate for you and have Certbot edit your Nginx configuration automatically to serve it. If you're feeling more conservative and would like to make the changes to your Nginx configuration by hand, you can use the certonlysubcommand. To see instructions on how to use this subcommand, select "None of the above" in the first drop-down menu above.

To learn more about how to use Certbot read our documentation.

Automating renewal

The Certbot packages on your system come with a cron job that will renew your certificates automatically before they expire. Since Let's Encrypt certificates last for 90 days, it's highly advisable to take advantage of this feature. You can test automatic renewal for your certificates by running this command:

$ sudo certbot renew --dry-run

More detailed information and options about renewal can be found in the full documentation.


目录
打赏
0
0
0
0
11
分享
相关文章
|
12天前
|
Ubuntu下部署及操作Docker技巧
以上就是在Ubuntu下部署及操作Docker的具体步骤。但这只是冰山一角,Docker的魅力远不仅如此。你可以将其视为存放各种工具的小箱子,随时随地取用,极大地提升工作效率。你也可以私人订制,适应不同的开发环境,就像一个拥有各种口味冰淇淋的冰箱,满足各种各样的需求。好了,现在你已经掌握了基本的Docker运用技巧,快去尝试使用吧!记住,沉浸在探索中,你会找到无尽的乐趣和满满的收获。
69 23
阿里云数字证书管理服务免费版和收费版SSL证书区别、收费标准、申请及部署教程参考
阿里云数字证书管理服务提供多种SSL证书类型和品牌,适用于不同规模的网站,包括但不限于电商、小型企业、大型企业或个人等。阿里云SSL证书有收费版的也有免费版的,有的新手用户由于是初次在阿里云申请SSL证书,可能不是很清楚免费版证书的申请和部署流程,本文为以图文形式为大家展示阿里云免费版SSL证书最新的申请及部署教程,以供参考。
阿里云2025智惠采购季,WoSign SSL证书优惠叠加使用攻略
阿里云2025智惠采购季,WoSign SSL证书折上折满减优惠!活动月期间(2025年03月01日至03月31日)活动折扣叠加满减优惠券,具体如何操作才能获取组合优惠价格呢?快来get优惠券组合使用攻略吧!
464 4
阿里云申请SSL证书价格多少钱一年?2025免费版和付费版收费标准
阿里云SSL证书提供免费和付费版本,适合不同需求。付费证书品牌涵盖WoSign、DigiCert、GlobalSign等,类型包括DV(域名验证)、OV(企业验证)和EV(扩展验证),价格从238元/年起,通配符和多域名证书价格更高。新用户享5折起优惠,全系列75折起。免费版由Digicert提供,仅支持单域名,有效期3个月,特殊域名可能无法申请。建议正式环境选用付费证书以确保稳定性与安全性。详情及申请流程可参考阿里云官方文档或控制台操作指引。
559 0
阿里云WoSign“国密RSA双SSL证书”应用实践
阿里云WoSign品牌SSL证书是阿里云平台热销的国产品牌证书之一,支持签发国密合规的SM2算法SSL证书以及全球信任的RSA算法SSL证书,能够满足平台用户不同的SSL证书应用需求,同时为用户提供国密模块支持,实现“国密/RSA双证书部署”。
419 6
阿里云WoSign“国密RSA双SSL证书”应用实践
2025阿里云智惠采购季,WoSign SSL国产证书折上折满减优惠
**2025阿里云“智慧采购季,就上阿里云”活动火热进行中!** 3月1日至31日,阿里云WoSign品牌SSL证书新老用户同享折上折满减优惠。DV SSL证书低至220元/年起,轻松实现HTTPS加密,保障数据传输安全。领取“智惠采购季上云礼包”,先领券再下单,享受满减优惠。WoSign品牌SSL证书国密RSA双算法支持,确保广泛兼容与可靠部署。
730 2
2025阿里云智惠采购季,WoSign SSL国产证书折上折满减优惠
【运维实战分享】轻松搞定 SSL 证书管理,告别证书繁琐操作
Spug证书平台的最大亮点之一就是其极为简化的证书申请流程,无论是新手还是经验丰富的运维专家,都可以在几分钟内轻松完成证书的申请,通过微信扫码直接登录申请,无需复杂注册,整个过程既方便又快捷。
96 17
在Ubuntu Linux系统下如何搭建并安装EDK2
以上就是在Ubuntu Linux系统下搭建并安装EDK2的过程。这个过程可能会有些复杂,但只要按照步骤一步步来,应该不会有太大问题。如果在过程中遇到任何问题,都可以在网上找到相应的解决方案。希望这个指南能对你有所帮助!
41 17
在Ubuntu系统的Docker上安装MySQL的方法
以上的步骤就是在Ubuntu系统的Docker上安装MySQL的详细方法,希望对你有所帮助!
77 12
|
18天前
|
Ubuntu中dpkg和apt命令:debian包安装详解
希望这让你对于Ubuntu中的dpkg和apt命令有了更为清晰的理解。下次你面对软件包安装的问题,就可以轻松应对,优雅地在你的Linux系统中游刃有余了。
144 10

热门文章

最新文章

AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等