Configuration Files
APISIX has the following configuration files under /conf:
config.yamlconfig.yaml.exampleapisix.yamldebug.yaml
In addition, you can place apisix.json under /conf if you wish to work with JSON in the file-driven standalone mode.
This document provides a reference for how configuration files are used and how to manage configuration files by environments.
Usage
config.yaml and config.yaml.example
APISIX comes with a configuration file config.yaml, which is used to customize a number of parameters, including the listening interface, deployment mode, plugin attributes, and more.
The default values for these parameters can be found in apisix/cli/config.lua.
You may find the sample configuration file for config.yaml at config.yaml.example:
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
# ...
Configurations in config.yaml is loaded once at startup. If you make any updates to this file, reload APISIX for changes to take effect.
Select the AI Gateway HTTP Client
AI Proxy, AI Proxy Multi, and AI Request Rewrite use ngx_http_ffi_client by default for requests to LLM upstreams. Set the shared plugin attribute to lua-resty-http when the installed runtime does not provide the FFI client module or when you need the Lua client path:
plugin_attr:
ai-proxy:
http_client: lua-resty-http
The accepted values are ngx_http_ffi_client and lua-resty-http. An unknown value fails plugin attribute validation. Selecting ngx_http_ffi_client on a runtime without resty.ngx_http_ffi_client causes AI upstream requests to fail when the client is created.