Browse Source

更新证书申请文档

zjcqoo 6 years ago
parent
commit
9f376d4167
2 changed files with 12 additions and 12 deletions
  1. 3 1
      docs/cert-auto.md
  2. 9 11
      docs/cert-manual.md

+ 3 - 1
docs/cert-auto.md

@@ -63,4 +63,6 @@ ssl_certificate_key   cert/$domain/ecc.key;
 
 ```bash
 iptables -t nat -D PREROUTING 1
-```
+```
+
+如果 80 端口运行没有其他服务,可以不关闭。因为 Let's Encrypt 证书有效期只有 3 个月,所以 acme.sh 会定期执行续签脚本。如果 80 端口关闭则无法自动续签。

+ 9 - 11
docs/cert-manual.md

@@ -5,17 +5,15 @@
 
 ## 方案 1 —- 通过 80 端口验证
 
-前提条件:需要 root 权限
+前提条件:公网 IP 能访问 80 端口,设备需要 root 权限
 
 1.输入 `服务器IP.xip.io`
 
-2.Manual Verification -> Manually Verify Domain
+2.`Manual Verification` -> `Manually Verify Domain` -> `Download File`
 
-3.Download File
+3.文件保存到服务器 `~/server/acme/.well-known/acme-challenge/` 目录
 
-4.文件保存到服务器 `~/server/acme/.well-known/acme-challenge/` 目录
-
-5.转发 80 端口到 10080 端口(需要 root 权限)
+4.转发 80 端口到 10080 端口(需要 root 权限)
 
 ```bash
 iptables -t nat -I PREROUTING 1 -p tcp --dport 80 -j REDIRECT --to-ports 10080
@@ -23,11 +21,11 @@ iptables -t nat -I PREROUTING 1 -p tcp --dport 80 -j REDIRECT --to-ports 10080
 
 当然也可以使用其他 Web 服务,只要该文件能被外部访问就可以。
 
-6.测试链接能否访问(Verify successful upload by visiting the following links in your browser)
+5.测试链接能否访问(Verify successful upload by visiting the following links in your browser)
 
-7.Download SSL Certificate
+6.Download SSL Certificate
 
-8.保存证书
+7.保存证书
 
 `Certificate` 保存到 `~/server/cert/xip.io/cert`
 
@@ -43,11 +41,11 @@ ssl_certificate_key   cert/xip.io/key;
 
 重启服务:`~/server/run.sh reload`
 
-9.验证
+8.验证
 
 访问 `https://服务器IP.xip.io:8443/`,没出现证书错误即成功(404 等错误不影响)。
 
-10.关闭 80 端口转发
+9.关闭 80 端口转发
 
 ```bash
 iptables -t nat -D PREROUTING 1