配置文件
APISIX 在 /conf 下有以下配置文件:
config.yamlconfig.yaml.exampleapisix.yamldebug.yaml
此外,如果你希望在 文件驱动的独立模式 下使用 JSON,你可以将 apisix.json 放在 /conf 下。
本文档提供了有关如何使用配置文件以及如何按环境管理配置文件的参考。
用法
config.yaml 和 config.yaml.example
APISIX 带有一个配置文件 config.yaml,用于自定义许多参数,包括监听接口、部署模式、插件属性等。
这些参数的默认值可以在 apisix/cli/config.lua 中找到。
你可以在 config.yaml.example 中找到 config.yaml 的示例配置文件:
apisix:
# node_listen: 9080 # APISIX listening port (single)
node_listen: # APISIX listening ports (multiple)
- 9080
# - port: 9081
# enable_http2: true # If not set, the default value is `false`.
# - ip: 127.0.0.2
# port: 9082
# enable_http2: true
enable_admin: true
enable_dev_mode: false
enable_reuseport: true
# ...
config.yaml 中的配置在启动时加载一次。如果你对此文件进行了任何更新,请 重新加载 APISIX 以使更改生效。