anjia0532 commented on a change in pull request #4297: URL: https://github.com/apache/apisix/pull/4297#discussion_r637832360
########## File path: docs/zh/latest/FAQ.md ########## @@ -486,3 +486,17 @@ apisix: 重启或 reload APISIX,所有 IP 便可以访问 `Admin API`。 **注意:您可以在非生产环境中使用此方法,以允许所有客户端从任何地方访问您的 `Apache APISIX` 实例,但是在生产环境中使用它并不安全。在生产环境中,请仅授权特定的 IP 地址或地址范围访问您的实例。** + +## 基于acme.sh自动更新apisix ssl证书 + +```bash +$ curl --output /root/.acme.sh/renew-hook-update-apisix.sh --silent https://gist.githubusercontent.com/anjia0532/9ebf8011322f43e3f5037bc2af3aeaa6/raw/65b359a4eed0ae990f9188c2afa22bacd8471652/renew-hook-update-apisix.sh + +$ chmod +x /root/.acme.sh/renew-hook-update-apisix.sh + +$ acme.sh --issue --staging -d demo.domain --renew-hook "~/.acme.sh/renew-hook-update-apisix.sh -h http://apisix-admin:port -p /root/.acme.sh/demo.domain/demo.domain.cer -k /root/.acme.sh/demo.domain/demo.domain.key -a xxxxxxxxxxxxx" Review comment: 1. 为何提这个PR,源于这个issues https://github.com/apache/apisix/issues/3841#issuecomment-844628829 2. 这是一个常见的需求或者特性,目前apisix不支持自动续期或者更新ssl 3. 改动源码比较麻烦而用acme.sh的hook特性来实现会比较容易,而acme.sh也是比较常见的开源软件,所以才写了一个脚本 很抱歉我的英文不太好,为了不引起一些误会或者歧义,使用中文回复。 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
