Capture full request/response body logging in nginx configured in reverse proxy mode reports nginx: [emerg] unknown directive "log_by_lua_block"

Reinis Rozitis r at roze.lv
Tue Dec 19 13:58:12 UTC 2023


> nginx: [emerg] unknown directive "log_by_lua_block" in /etc/nginx/conf.d/microservice.conf:8
> nginx: configuration file /etc/nginx/nginx.conf test failed

You need nginx lua/openresty module, but I'm not sure if Centos (community version) repository has it.

You might need to build it yourself https://github.com/openresty/lua-nginx-module#installation 

Or use the nginx plus commercial version: https://docs.nginx.com/nginx/admin-guide/dynamic-modules/lua/


rr


More information about the nginx mailing list