如何在Ubuntu 18.04上使用Let’S ENCRYPT来保护Nginx

1、安装Certbot

Certbot正处于非常活跃的开发阶段,因此Ubuntu提供的Certbot软件包往往过时。但是,Certbot开发人员维护一个具有最新版本的Ubuntu软件存储库,因此我们将使用该存储库。

首先,添加存储库:

sudo add-apt-repository ppa:certbot/certbot

安装Certbot的Nginx软件包apt:

sudo apt install python-certbot-nginx

2、确认nginx配置

3、通过防火墙允许HTTPS

4、获取SSL证书

sudo certbot --nginx -d wyxxt.org.cn

5、验证Certbot自动续订

sudo certbot renew --dry-run
Scroll to Top