Hello!
Please read the official documentation of ngx_lua on this topic:
https://github.com/openresty/lua-nginx-module#statically-linking-pure-lua-modules
> I have library
> platform.a in /tmp/files directory
> ./configure --with-luajit --sbin-path=/usr/sbin
> --pid-path=/var/run/nginx.pid -j2 --with-http_stub_status_module
> --with-ld-opt='-Wl,-E -L/tmp/files -lplatform
>
Your command is wrong. Please follow the documentation.
Also, try always providing details instead of simply saying "it does
not work", which is not really helpful for diagnostics, unfortunately.
> Also, in the config I was using content_by_lua_file 'abc.lua'
> How will that look when I have a static library compiled?
>
This technique only affects Lua module files that are loaded by
require(). This is also documented in the link above.
> The code in lua file gets changed frequently, is there an option of doing
> the same with dynamic libraries?
>
I don't think LuaJIT supports this. You can ask on the official luajit
mailing list for such features instead.
Regards,
-agentzh