Ubuntu 14.04 SSL免费证书

不说前提不废话,开始

 

1. lets encrypt 官网:https://letsencrypt.org/

2. 下载letsencrypt

 

 git clone https://github.com/letsencrypt/letsencrypt

3. 关闭nginx,一定要关闭nginx

 

4. 生成证书

$ ./letsencrypt-auto -d simiie.com auth
Requesting root privileges to run certbot...
  /home/bolomma/.local/share/letsencrypt/bin/letsencrypt -d simiie.com auth
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Failed to find executable apache2ctl in PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

How would you like to authenticate with the ACME CA?
-------------------------------------------------------------------------------
1: Spin up a temporary webserver (standalone)
2: Place files in webroot directory (webroot)
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 1
./letsencrypt-auto -d simiie.com auth
Requesting root privileges to run certbot...
  /home/bolomma/.local/share/letsencrypt/bin/letsencrypt -d simiie.com auth
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Failed to find executable apache2ctl in PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

How would you like to authenticate with the ACME CA?
-------------------------------------------------------------------------------
1: Spin up a temporary webserver (standalone)
2: Place files in webroot directory (webroot)
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 1

这里我选择临时:1

 

5. 接下来会在/etc/letsencrypt下生成很多目录,进入live目录,有对应的4个证书文件

6. fullchain.pem是公钥,privkey.pem是私钥,配置进nginx就可以了

 

https://linux.cn/article-6565-1.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值