acme申请ssl证书

更新时间:2023-06-15 01:19:51 阅读: 评论:0

acme申请ssl证书
acme申请ssl证书
# 安装 Acme 脚本
curl get.acme.sh | sh
# 如果下载失败
#curl: (35) TCP connection ret by peer
# 去能下载的主机复制过来
cat >> ~/.bashrc <<EOF
. "/root/.acme.sh/v"
EOF
. ~/.bashrc
# 设置为⾃动更新kung fu panda
acme.sh  --upgrade  --auto-upgrade
# 安装 Acme 脚本之后,请先执⾏下⾯的命令(下⾯的邮箱为你的邮箱)
~/.acme.sh/acme.sh --register-account -m
[root@yang ~]# ~/.acme.sh/acme.sh --register-account -m polypropylene yarn
# 80 端⼝空闲的验证申请
# 如果你还没有运⾏任何 web 服务, 80 端⼝是空闲的, 那么 Acme.sh 还能假装⾃⼰是⼀个 WebServer, 临时监听在 80 端⼝, 完成验证
#~/.acme.sh/acme.sh --issue -d *. --standalone
# Nginx 的⽅式验证申请
# 这种⽅式需要你的服务器上⾯已经部署了 Nginx 环境,并且保证你申请的域名已经在 Nginx 进⾏了 conf 部署。(被申请的域名可以正常被打开)
# 貌似不能使⽤通配符的形式
~/.acme.sh/acme.sh --issue  -d *.  --nginx
[root@yang ~]# ~/.acme.sh/acme.sh --issue  -d *.  --nginx
[2021年 10⽉ 13⽇星期三 16:04:59 CST] Using CA: /v2/DV90
[2021年 10⽉ 13⽇星期三 16:04:59 CST] Creating domain key
[2021年 10⽉ 13⽇星期三 16:04:59 CST] The domain key is here: /root/.acme.sh/*./*.key
黑山加入北约[2021年 10⽉ 13⽇星期三 16:04:59 CST] Single domain='*.'
放尿[2021年 10⽉ 13⽇星期三 16:04:59 CST] Getting domain auth token for each domain
[2021年 10⽉ 13⽇星期三 16:05:05 CST] Getting webroot for domain='*.'
[2021年 10⽉ 13⽇星期三 16:05:05 CST] Error, can not get domain token entry *. for http-01
[2021年 10⽉ 13⽇星期三 16:05:05 CST] The supported validation types are: dns-01 , but you specified: http-01
[2021年 10⽉ 13⽇星期三 16:05:05 CST] Plea add '--debug' or '--log' to check more details.
[2021年 10⽉ 13⽇星期三 16:05:05 CST] See: /acmesh-official/acme.sh/wiki/How-to-debug-acme.sh [root@yang ~]# ll /root/.acme.sh/*./
总⽤量 20lucifer什么意思
drwxr-xr-x 2 root root 4096 10⽉ 13 16:07 backup
-rw-r--r-- 1 root root  380 10⽉ 13 16:07 *.f
-rw-r--r-- 1 root root  956 10⽉ 13 16:04 *.sr
-rw-r--r-- 1 root root  148 10⽉ 13 16:04 *.sr.conf
-rw-r--r-- 1 root root 1679 10⽉ 13 16:04 *.key
# 安装证书到指定⽂件夹
# 注意, 默认⽣成的证书都放在安装⽬录下: ~/.acme.sh/, 请不要直接使⽤此⽬录下的证书⽂件。
# 正确的使⽤⽅法是使⽤ --install-cert 命令,并指定⽬标位置, 然后证书⽂件会被copy到相应的位置,⽐如下⾯的代码~/.acme.sh/acme.sh --installcert - --key-file /root/private.key --fullchain-file /
~/.acme.sh/acme.sh --installcert -d *. --key-file /root/private.key --fullchain-file /
#上⾯的 /root/private.key 以及 / 是把密钥和证书安装到 /root ⽬录,并改名为 private.key 和
cat: /root/.acme.sh/*./: 没有那个⽂件或⽬录
#=================
just the way you are什么意思# 再来⼀次
openworld# 上⼀次找不到nginx的conf配置⽂件
~/.acme.sh/acme.sh --issue  -m  --nginx
# 这次ok
[2021年 10⽉ 13⽇星期三 16:44:36 CST] Your cert is in: /root/.acme.m.cer
[2021年 10⽉ 13⽇星期三 16:44:36 CST] Your cert key is in: /root/.acme.m.key
breed过去式[2021年 10⽉ 13⽇星期三 16:44:36 CST] The intermediate CA cert is in: /root/.acme.
[2021年 10⽉ 13⽇星期三 16:44:36 CST] And the full chain certs is there: /root/.acme.
~/.acme.sh/acme.sh --installcert -m --key-file /root/private.key --fullchain-file /pack it for me
雅思英语听力下载[root@k8s-master ~]# ~/.acme.sh/acme.sh --installcert -m --key-file /root/private.key --fullchain-file / [2021年 10⽉ 13⽇星期三 16:45:20 CST] Installing key to: /root/private.key
[2021年 10⽉ 13⽇星期三 16:45:20 CST] Installing full chain to: /
mkdir -p /usr/local/nginx/cert/
mv /root/private.key /usr/local/nginx/m.private.key
mv / /usr/local/nginx/
rver {
listen 443 ssl;
rver_m;
#return m;
#rewrite ^(.*)$ ;
ssl_certificate  /usr/local/nginx/;
ssl_certificate_key  /usr/local/nginx/m.private.key;
ssl_ssion_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_rver_ciphers on;
location / {
include /etc/f;
proxy_pass zentao;
}
}

本文发布于:2023-06-15 01:19:51,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/90/145398.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:证书   申请   安装   下载   指定   通配符   验证   域名
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图