java后端集群化专题

使用Let's Encrypt免费证书实现https

2018-04-25  本文已影响6人  江江的大猪

Let's Encrypt最为免费CA和主流浏览器厂商都有合作,它的免费证书上线到现在可以说很大的推动了全网https化,尤其是小型站点。大型站点出于安全考虑还是会买更贵的证书,那些证书的审批更加严格,而且会有保证金,如果因为证书认证造成损失的会赔很多钱。但是对于中小站点,只能说Let's Encrypt是业界良心,新手福音~

本文的环境是centos7+nginx,Let's Encrypt提供的证书生成软件在不同的环境也不一样。不同的环境去官网看资料,很详细,无脑照着做就行了
PS: Let's Encrypt生成证书的工具只支持*nix系统,win的小伙伴没有办法用哦

# 安装certbot客户端
yum install certbot-nginx
# 生成证书,如果不加certonly,certbot会自动修改nginx的配置文件。我只想让它生成证书,配置nginx的工作自己做。
# 执行之后会有好多选项,输入邮箱、阅读协议是否同意、是否允许Let's Encrypt往邮箱发一些通知邮件、选择要生成证书的域名
certbot --nginx certonly
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/www.laifuzhi.cn/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/www.laifuzhi.cn/privkey.pem
   Your cert will expire on 2018-07-24. 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"
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.
上一篇 下一篇

猜你喜欢

热点阅读