This plugin supports any NGINX Open Source that has OpenResty installed, including API gateways built on top of OpenResty.
How to Install
-
Ensure you have lua-nginx-module installed.
- If you’re running an OpenResty image, it’s already installed.
- If you’re using NGINX Plus, follow the official NGINX Plus Lua module setup
- Install the Atatus LuaRock:
Configuration (Generic OpenResty)
Edit yournginx.conf to load the Atatus plugin.
If needed, replace /usr/local/openresty/luajit/share/lua/5.1/resty with the correct Lua plugin installation path.
You can find it using:
Example Configuration
Configuration Options
Static Options (set at startup in init_by_lua_block)Dynamic Variables (set per request)
Set these variables in ngx.var (e.g., in header_filter_by_lua_block or body_filter_by_lua_block):Example:
Troubleshooting
- Response body not logged