This is an automated email from the ASF dual-hosted git repository.
tokers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new 617c325 docs: Add some questions and answers to the FAQ (#4670)
617c325 is described below
commit 617c325628f33961be67f61f0fa8002afc370e42
Author: tzssangglass <[email protected]>
AuthorDate: Tue Jul 27 18:15:20 2021 +0800
docs: Add some questions and answers to the FAQ (#4670)
---
docs/en/latest/FAQ.md | 19 ++++++++++++++++++-
docs/zh/latest/FAQ.md | 20 +++++++++++++++++++-
2 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/docs/en/latest/FAQ.md b/docs/en/latest/FAQ.md
index 18a9cbb..f9038a0 100644
--- a/docs/en/latest/FAQ.md
+++ b/docs/en/latest/FAQ.md
@@ -551,4 +551,21 @@ apisix:
**Note:**
-- Whenever trying to connect TLS services with cosocket, you should set
`apisix.ssl.ssl_trusted_certificate`
+- Whenever trying to connect TLS services with cosocket, if APISIX does not
trust the peer's TLS service certificate, you should set
`apisix.ssl.ssl_trusted_certificate`
+
+As an example, if using Nacos as a service discovery in APISIX, Nacos has TLS
protocol enabled, i.e. Nacos configuration `host` starts with `https://`, so
you need to configure `apisix.ssl.ssl_trusted_certificate` and use the same CA
certificate as Nacos.
+
+## How to fix `module 'resty.worker.events' not found` error
+
+Installing APISIX under the `/root` directory causes this problem. Because the
worker process is run by the user `nobody`, it does not have enough permissions
to access the files in the `/root` directory. You need to change the APISIX
installation directory, and it is recommended to install it in the `/usr/local`
directory.
+
+## What is the difference between `plugin-metadata` and `plugin-configs`
+
+`plugin-metadata` is the metadata of the plugin, which is shared by all
configuration instances of the plugin. When writing a plugin. If there are some
property changes that need to take effect for all configuration instances of
the plugin, then it is appropriate to put them in `plugin-metadata`.
+
+`plugin-configs` is a collection of configuration instances of multiple
different plugins. If you want to reuse a common set of plugin configuration
instances, you can extract them into a Plugin Config and bind them to the
corresponding routes.
+
+The difference between `plugin-metadata` and `plugin-configs`:
+
+- Plugin configuration instance scope: `plugin-metadata` works on all
configuration instances of this plugin. `plugin-configs` works on the plugin
configuration instances under configured it.
+- Binding entities: `plugin-metadata` take effect on the entities bound to all
configuration instances of this plugin. `plugin-configs` take effect on the
routes bound to this `plugin-configs`.
diff --git a/docs/zh/latest/FAQ.md b/docs/zh/latest/FAQ.md
index 9cb36fa..8aae9bf 100644
--- a/docs/zh/latest/FAQ.md
+++ b/docs/zh/latest/FAQ.md
@@ -549,4 +549,22 @@ apisix:
```
**注意:**
-尝试使用 cosocket 连接任何TLS服务时,都需要配置 `apisix.ssl.ssl_trusted_certificate`
+
+尝试使用 cosocket 连接任何 TLS 服务时,如果 APISIX 不信任对端 TLS 服务证书,都需要配置
`apisix.ssl.ssl_trusted_certificate`。
+
+举例:在 APISIX 中使用 Nacos 作为服务发现时,Nacos 开启了 TLS 协议, 即 Nacos 配置的 `host` 是
`https://` 开头,需要配置 `apisix.ssl.ssl_trusted_certificate`,并且使用和 Nacos 相同的 CA 证书。
+
+## 如何解决 `module 'resty.worker.events' not found` 错误
+
+在 `/root` 目录下安装 APISIX 会导致这个问题。因为 worker 进程的用户是 nobody,无权访问 `/root`
目录下的文件。需要移动 APISIX 安装目录,推荐安装在 `/usr/local` 目录下。
+
+## `plugin-metadata` 和 `plugin-configs` 有什么区别
+
+`plugin-metadata` 是插件的元数据,由插件的所有配置实例共享。在编写插件时,如果有一些属性变化需要对该插件的所有配置实例生效,那么放在
`plugin-metadata` 合适。
+
+`plugin-configs` 是指多个不同插件的配置实例的组合,如果你想要复用一组通用的插件配置实例,你可以把它们提取成一个 Plugin
Config,并绑定到对应的路由上。
+
+`plugin-metadata` 和 `plugin-configs` 的区别在于:
+
+ - 插件实例作用范围:`plugin-metadata` 作用于该插件的所有配置实例。`plugin-configs` 作用于其下配置的的插件配置实例。
+ - 绑定主体作用范围:`plugin-metadata` 作用于该插件的所有配置实例绑定的主体。`plugin-configs` 作用于绑定了该
`plugin-configs` 的路由。