Repository navigation
Commit 286e36d
committed
fix(nginx): HTTP 下放行域名验证与 ACME 挑战路径
阿里云 CDN 域名归属验证以 http:// 直接请求 verification.html 且不跟随
301,而 80 端口原为 server 级 return 301,导致验证程序只能拿到 301 而
判定失败(实测:HTTP 不跟随重定向为 301、跟随后为 200、HTTPS 为 200)。
nginx 的 server 级 return 在 SERVER_REWRITE 阶段执行、早于 location 匹配,
故将 return 301 下移至 location /,并为 /verification.html 加精确匹配;
同时预留 /.well-known/acme-challenge/ 前缀匹配,避免将来 Let's Encrypt
webroot 模式续期同样被 301 拦截。1 parent d521948 commit 286e36d
1 file changed
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
48 | 68 | | |
49 | 69 | | |
50 | 70 | | |
| |||
0 commit comments