From 5b3da6e1822239b42d82f2849eaeb823a2405a7c Mon Sep 17 00:00:00 2001 From: ZShab Niba <44338441+nibazshab@users.noreply.github.com> Date: Sun, 18 Sep 2022 18:24:03 +0800 Subject: [PATCH] =?UTF-8?q?Updated=20=E8=AF=B4=E6=98=8E=20(markdown)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 说明.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/说明.md b/说明.md index 5e9141d..4bde296 100644 --- a/说明.md +++ b/说明.md @@ -15,7 +15,7 @@ 安装很简单, 一个命令: ``` -curl https://get.acme.sh | sh -s email=my@example.com +curl https://get.acme.sh | sh -s email=my@example.com ``` 普通用户和 root 用户都可以安装使用. @@ -42,19 +42,19 @@ curl https://get.acme.sh | sh -s email=my@example.com ### 1. http 方式需要在你的网站根目录下放置一个文件, 来验证你的域名所有权,完成验证. 然后就可以生成证书了. ``` -acme.sh --issue -d mydomain.com -d www.mydomain.com --webroot /home/wwwroot/mydomain.com/ +acme.sh --issue -d mydomain.com -d www.mydomain.com --webroot /home/wwwroot/mydomain.com/ ``` 只需要指定域名, 并指定域名所在的网站根目录. **acme.sh** 会全自动的生成验证文件, 并放到网站的根目录, 然后自动完成验证. 最后会聪明的删除验证文件. 整个过程没有任何副作用. 如果你用的 **apache**服务器, **acme.sh** 还可以智能的从 **apache**的配置中自动完成验证, 你不需要指定网站根目录: ``` -acme.sh --issue -d mydomain.com --apache +acme.sh --issue -d mydomain.com --apache ``` 如果你用的 **nginx**服务器, 或者反代, **acme.sh** 还可以智能的从 **nginx**的配置中自动完成验证, 你不需要指定网站根目录: ``` -acme.sh --issue -d mydomain.com --nginx +acme.sh --issue -d mydomain.com --nginx ``` **注意, 无论是 apache 还是 nginx 模式, acme.sh在完成验证之后, 会恢复到之前的状态, 都不会私自更改你本身的配置. 好处是你不用担心配置被搞坏, 也有一个缺点, 你需要自己配置 ssl 的配置, 否则只能成功生成证书, 你的网站还是无法访问https. 但是为了安全, 你还是自己手动改配置吧.** @@ -62,7 +62,7 @@ acme.sh --issue -d mydomain.com --nginx 如果你还没有运行任何 web 服务, **80** 端口是空闲的, 那么 **acme.sh** 还能假装自己是一个webserver, 临时听在**80** 端口, 完成验证: ``` -acme.sh --issue -d mydomain.com --standalone +acme.sh --issue -d mydomain.com --standalone ``` 更高级的用法请参考: https://github.com/Neilpang/acme.sh/wiki/How-to-issue-a-cert @@ -74,7 +74,7 @@ acme.sh --issue -d mydomain.com --standalone 坏处是,如果不同时配置 Automatic DNS API,使用这种方式 acme.sh 将无法自动更新证书,每次都需要手动再次重新解析验证域名所有权。 ``` -acme.sh --issue --dns -d mydomain.com \ +acme.sh --issue --dns -d mydomain.com \ --yes-I-know-dns-manual-mode-enough-go-ahead-please ``` @@ -83,7 +83,7 @@ acme.sh --issue --dns -d mydomain.com \ 等待解析完成之后, 重新生成证书: ``` -acme.sh --renew -d mydomain.com \ +acme.sh --renew -d mydomain.com \ --yes-I-know-dns-manual-mode-enough-go-ahead-please ``` @@ -101,7 +101,7 @@ export DP_Id="1234" export DP_Key="sADDsdasdgdsf" -acme.sh --issue --dns dns_dp -d aa.com -d www.aa.com +acme.sh --issue --dns dns_dp -d aa.com -d www.aa.com ``` @@ -109,7 +109,7 @@ acme.sh --issue --dns dns_dp -d aa.com -d www.aa.com 直接生成就好了: ``` -acme.sh --issue -d mydomain2.com --dns dns_dp +acme.sh --issue -d mydomain2.com --dns dns_dp ``` 更详细的 api 用法: https://github.com/Neilpang/acme.sh/blob/master/dnsapi/README.md @@ -208,25 +208,25 @@ acme.sh --upgrade 如果你不想手动升级, 可以开启自动升级: ``` -acme.sh --upgrade --auto-upgrade +acme.sh --upgrade --auto-upgrade ``` 之后, acme.sh 就会自动保持更新了. 你也可以随时关闭自动更新: ``` -acme.sh --upgrade --auto-upgrade 0 +acme.sh --upgrade --auto-upgrade 0 ``` # 8. 出错怎么办: 如果出错, 请添加 debug log: ``` -acme.sh --issue ..... --debug +acme.sh --issue ..... --debug ``` 或者: ``` -acme.sh --issue ..... --debug 2 +acme.sh --issue ..... --debug 2 ``` 请参考: https://github.com/Neilpang/acme.sh/wiki/How-to-debug-acme.sh