使用已经安装的 openresty 安装 resty.http

lon*_*der 2 lua nginx google-oauth openresty

我安装了 openresty-1.13.6.1 但它缺少 'resty.http' 模块。我的 openresty 安装在 /usr/local/openresty 中,我需要将 resty.http 模块与它集成。怎么做?

Ale*_*ler 5

只需将两个文件(https://github.com/pintsized/lua-resty-http/tree/master/lib/resty)复制到 /usr/local/openresty/lualib 文件夹中。

更新:

结果文件结构应该是:

/usr/local/openresty/lualib/resty/http.lua
/usr/local/openresty/lualib/resty/http_headers.lua
Run Code Online (Sandbox Code Playgroud)