CentOS7 & OpenLitespeed服务器安装Let’s Encrypt免费SSL证书方法

  

Let’s Encrypt,OpenLiteSpeed,SSL,免费SSL证书,CentOS7 & OpenLitespeed服务器安装Let’s Encrypt免费SSL证书方法

首先在centos7上安装certbot

1
2
3
yum -y install yum-utils
yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
sudo yum install certbot

接着运行certbot

1
certbot certonly

Let’s Encrypt,OpenLiteSpeed,SSL,免费SSL证书,CentOS7 & OpenLitespeed服务器安装Let’s Encrypt免费SSL证书方法

生成Let’s Encrypt免费SSL证书

路径一般为
/etc/letsencrypt/live/你申请时填写的域名/fullchain.pem
/etc/letsencrypt/live/你申请时填写的域名/privkey.pem
注册成功提示信息为:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/op.xxxx.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/op.xxxx.com/privkey.pem
Your certificate will expire on 2021-07-25. To obtain a new or
tweaked version of this certificate in the future, simply run
certbot again. To non-interactively renew *all* of your
certificates, run "certbot renew"
- If you like Certbot, please consider supporting our work by:

注:SSL过期重新注册命令为

1
certbot-auto renew

可以使用crontab -e 自动定期执行证书更新

最后登录OpenLitespeed后台(IP:7080)

选项路径OpenLiteSpeed > Web Console > Listeners > SSL > SSL Private Key & Certificate
设置刚才获得的路径,然后平滑重启OpenLitespeed服务器即可
私钥文件Private Key File: /etc/letsencrypt/live/YOUR_DOMAIN/privkey.pem
证书文件Certificate File: /etc/letsencrypt/live/YOUR_DOMAIN/fullchain.pem