1

Topic: The job of ways to scripts in a sheaf openresty - lua

Is location in a config nginx c script connection lua:. location/download {content_by_lua_file "/scripts/download.lua";}. In download.lua is require (' module ') with a docker-image openresty:alpine-fat such connection worked without additional actions. Then it was necessary to pass on openresty:xenial, and this method of connection ceased to work - nginx the script could not fulfill require (' module ') from download.lua could not find that. Tried in require to transfer the unit and as '/scripts/module ', and './module ', and it is simple ' module '. The parameter nginx lua_package_path Later got, installed it lua_package_path "/scripts/?. lua;;" after that nginx produced that cannot find files in/usr/local/openresty/nginx/scripts.  the directory with scripts also in/usr/local/openresty/nginx/scripts, earned. I remove from/scripts download.lua - continues to work (that is, it is taken from/usr/.) I remove from/scripts module - ceases to work, that is this file was searched already in scripts! Now the pattern is added: from a config nginx I can request a file from/usr/local/openresty/nginx/scripts (but I did not specify it evidently), thus other my scripts all the same should lie in/scripts/... How it is all to understand? Where I should allocate the scripts that they could request each other?

2

Re: The job of ways to scripts in a sheaf openresty - lua

Hello, Maxim_T, you wrote: M_T> I Remove from/scripts download.lua - continues to work (that is, it is taken from/usr/.), I remove from/scripts module - ceases to work, that is this file was searched already in scripts! Similar, experiment was not so pure. M_T> as it is all to understand? Where I should allocate the scripts that they could request each other? It at a search error deduces the list of ways where tried to search.