Skip to main content
Version: 2.5

APISIX

插件加载流程#

插件加载流程

插件内部结构#

插件内部结构

配置 APISIX#

通过修改本地 conf/config.yaml 文件,或者在启动 APISIX 时使用 -c--config 添加文件路径参数 apisix start -c <path string>,完成对 APISIX 服务本身的基本配置。

比如修改 APISIX 默认监听端口为 8000,其他配置保持默认,在 config.yaml 中只需这样配置:

apisix:  node_listen: 8000 # APISIX listening port

比如指定 APISIX 默认监听端口为 8000,并且设置 etcd 地址为 http://foo:2379, 其他配置保持默认。在 config.yaml 中只需这样配置:

apisix:  node_listen: 8000 # APISIX listening port
etcd:  host: "http://foo:2379" # etcd address

其他默认配置,可以在 conf/config-default.yaml 文件中看到,该文件是与 APISIX 源码强绑定, 永远不要手工修改 conf/config-default.yaml 文件。如果需要自定义任何配置,都应在 config.yaml 文件中完成。

注意 不要手工修改 APISIX 自身的 conf/nginx.conf 文件,当服务每次启动时,apisix 会根据 config.yaml 配置自动生成新的 conf/nginx.conf 并自动启动服务。