# prefix: /apisix # apisix config's prefix in etcd, /apisix by default log: error_log: level:warn# supports levels, lower to higher: debug, info, warn, error, panic, fatal file_path: logs/error.log# supports relative path, absolute path, standard output access_log: file_path: logs/a...
nginx_config: http: access_log_format: '{"remote_addr": "$remote_addr", "remote_user": "$remote_user", "time_local": "$time_local", "http_host": "$http_host", "request": "$request", "status": "$status", "body_bytes_sent": "$body_bytes_sent", "request_time": "$re...
我们从请求的生命周期说起:当一个请求进入到 Apache APISIX 时,首先会由http_access_phase这个方法进行处理。熟悉 OpenResty phases 概念的读者可能会有些疑惑:OpenResty 一共有 6 个 phases,按照执行的先后顺序排列,分别是:rewrite、access、before_proxy、header_filter、body_filter和log,为什么一上来就是access,rewr...
access_log: file_path: logs/access.log # supports relative path, absolute path, standard output # such as: logs/access.log, /tmp/logs/access.log, /dev/stdout, /dev/stderr # log example: 2020-12-09T16:38:09.039+0800 INFO filter/logging.go:46 /apisix/admin/routes/r1 {"status": 401...
Apache APISIX 支持多种日志插件,可以与其他外部的平台直接分享日志数据。Error Log 插件支持 HTTP 与 TCP 协议,并且兼容 SkyWalking 的日志格式。也可以通过 FluentBit 等日志收集组件,将日志同步到日志平台进行处理。 Access Log 插件目前还不支持在日志格式里面进行嵌套。因为 Access Log 插件是路由级别的,所以需要跟...
access_log logs/$time.access.log main; #access_log logs/host.access.log main; location / { proxy_pass http://apisix/; #proxy_set_header Host $host; proxy_set_header Host $host:$server_port; proxy_set_header X-Real-IP $remote_addr; ...
access_log off; } server { listen 9080 default_server reuseport; listen 9443 ssl default_server http2 reuseport; listen [::]:9080 default_server reuseport; listen [::]:9443 ssl default_server http2 reuseport; server_name _; # Apisix ssl 服务端证书配置 ...
access_log_format: '{"remote_addr": "$remote_addr", "remote_user": "$remote_user", "time_local": "$time_local", "http_host": "$http_host", "request": "$request", "status": "$status", "body_bytes_sent": "$body_bytes_sent", "request_time": "$request_time", "http_refere...
log_by_lua:记录access日志时的钩子。 准备好上述知识后,我们就可以回答APISIX是怎样接收etcd数据的更新了。 nginx.conf的生成方式 每个Nginx Worker进程都会在init_worker_by_lua阶段通过http_init_worker函数启动定时器: 代码语言:javascript 复制 init_worker_by_lua_block{apisix.http_init_worker()} ...
location=/apisix/nginx_status{allow127.0.0.0/24;deny all;access_log off;stub_status;}location/apisix/admin{set$upstream_scheme'http';set$upstream_host $http_host;set$upstream_uri'';allow127.0.0.0/24;deny all;content_by_lua_block{# https://github.com/apache/apisix/blob/e7d26dc4f0bd690c...