oflyhigh avatar

每天进步一点点:使用Certbot为Nginx站点添加SSL证书

oflyhigh

Published: 12 Jul 2019 › Updated: 12 Jul 2019每天进步一点点:使用Certbot为Nginx站点添加SSL证书

每天进步一点点:使用Certbot为Nginx站点添加SSL证书

之前曾经为自己的博客站点(咦,我的博客站点哪里去了?)设置SSL证书,网站服务器用的是Apache,那么Nginx站点是否也可以用Certbot来搞定HTTPS访问呢?答案是肯定的。

首先,访问如下页面:

https://certbot.eff.org/instructions

然后选择服务器类型和操作系统版本:

然后定向到新的页面中,按新页面提示操作即可。

操作步骤

首先SSH登录系统。

执行如下指令:
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update

安装certbot
sudo apt-get install certbot python-certbot-nginx

为网站设置证书
sudo certbot --nginx

按提示输入邮件地址:

按提示接受许可协议:

选择是否分享邮件地址:

选择要设置的站点(可用空格选择所有):

选择是否重定向http访问至https

搞定了,是不是很简单?至于自动续费它也帮我们设置好了定时任务脚本,完全不用我们操心,很体贴有木有?

相关链接


Vote For Me As Witness
https://steemit.com/~witnesses type in oflyhigh and click VOTE

Vote @oflyhigh via Steemconnect
Thank you!

Leave 每天进步一点点:使用Certbot为Nginx站点添加SSL证书 to:

Written by

Programmer, Maker, Freelancer, Witness. Make friends, Make money, Make life better!

Read more #cn posts


Best Posts From oflyhigh

We have not curated any of oflyhigh's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From oflyhigh