Lua 模块编译成功后启动 Nginx 服务器时出错

Lua 模块编译成功后启动 Nginx 服务器时出错

我已经使用 lua 模块编译了我的 Nginx 包。虽然编译成功,但在启动 nginx 服务器时出现以下错误:

nginx: [warn] lua_load_resty_core is deprecated (the lua-resty-core library is required since ngx_lua v0.10.16) in /app/middleware/nginx/conf/nginx.conf:24
nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled 
and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, 
consider using the OpenResty releases from https://openresty.org/en/download.html)
nginx: [alert] failed to load the 'resty.core' module (https://github.com/openresty/lua-resty-core); 
ensure you are using an OpenResty release from https://openresty.org/en/download.html (reason: /app/middleware/lua-resty-core/lib/lua/resty/core.lua:6: 
loop or previous error loading module 'resty.core.var') in /app/middleware/nginx/conf/nginx.conf:704

针对上述错误,谷歌提供了解决方案:

目前我的 nginx 版本是 1.20.2。请协助,因为我们需要在 nginx access.log 中记录响应正文。

问候,Raghu

相关内容