一名热爱体感技术的
业余专业开发人员

openresty lua module找不到

最后在openresty的lua_package_path配置里,加上双分号解决该问题

https://blog.csdn.net/li396864285/article/details/78493710

Lua; configuring path settings

A more conservative way of installing your plugin’s sources is
to avoid “polluting” the LuaRocks tree, and instead, point Kong
to the directory containing them.

This is done by tweaking the lua_package_path property of your Kong
configuration. Under the hood, this property is an alias to the LUA_PATH
variable of the Lua VM, if you are familiar with it.

Those properties contain a semicolon-separated list of directories in
which to search for Lua sources. It should be set like so in your Kong
configuration file:

  • 1
  • 2

Where:

  • /<path-to-plugin-location> is the path to the directory containing the
    extracted archive. It should be the location of the kong directory
    from the archive.
  • ? is a placeholder that will be replaced by
    kong.plugins.<plugin-name> when Kong will try to load your plugin. Do
    not change it.
  • ;; a placeholder for the “the default Lua path”. Do not change it.

Example:

The plugin something being located on the file system such that the
handler file is:

  • 1
  • 2

The location of the kong directory is: /usr/local/custom, hence the
proper path setup would be:

  • 1
  • 2

Multiple plugins:

If you wish to install two or more custom plugins this way, you can set
the variable to something like:

  • 1
  • 2
  • ; is the separator between directories.
  • ;; still means “the default Lua path”.

Note: you can also set this property via its environment variable
equivalent: KONG_LUA_PACKAGE_PATH.

评论 1

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    vim学习中,希望得到帮助。