春哥,你好!
我现在的环境是这样的openresty安装在
/usr/local/openresty
luarocks安装在
/usr/local/openresty/luajit/bin/luarocks下
然后我通过
luarocks --server=https://raw.github.com/torch/rocks/master install graphicsmagick
安装了这个功能模块
他被安装到了
/usr/local/openresty/luajit/bin/luarocks/luajit/share/lua/5.1/graphicsmagick/
然后/usr/local/openresty/luajit/bin/luarocks/luajit/share/lua/5.1/这个目录下面有这个模块所需要的依赖关系模块
如image/ 等。
现在问题是我如何在nginx里面通过
lua_package_path 使用这个模块?或者说如何让以后用luarocks安装的模块都直接能使用?
还有就是在ngx里面该如何require 这个模块,然后使用呢?
我以前的lua_package_path "/usr/local/openresty/lualib/resty/?.lua;;";是这样的
这个和现在luarocks安装的地方不一致该怎么办呢?二者如何都同时可以使用?
Attachment:
QQ截图20131217111404.png
Description: PNG image