acme 获取免费https证书

安装acme.sh脚本

curl https://get.acme.sh | sh -s email=my@example.com

使用 http方式验证域名

acme.sh --issue -d www.example.com --server letsencrypt --cert-file /opt/ssl/cert.pem --key-file /opt/ssl/cert.key --webroot /usr/local/openresty/nginx/html
# --server letsencrypt 指定letsencrypt服务器
#  --webroot /usr/local/openresty/nginx/html 指定index.html目录

使用阿里云dnsapi验证域名

#注意用户权限
export Ali_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
export Ali_Secret="jlsdflanljkljlfdsaklkjflsa"


acme.sh --issue --dns dns_ali --server letsencrypt -d example.com -d www.example.com

posted @ 2022-05-12 19:45  li66  阅读(110)  评论(0编辑  收藏  举报