Nginx location: Nginx location block section have a search order, a modifier, an implicit match type and an implicit switch to whether stop the search…
Method 1: use LuaFileSystem Method 2: use paths Method 3: Use Lua/APR Method 4: use os.mkdir Method 5: Not recommended Recent search terms:создать директорию в…
Read first: Lua Nginx|Openresty: use session with redis cluster Lua / Openresty: work with redis master-slave replication and redis sentinel Edit file /usr/local/share/lua/5.1/resty/session/storage/redis.lua Note: new…
We use lua-resty-redis-connector Install lua-resty-redis-connector luarocks install lua-resty-redis-connector Example of usage: Online demo: http://5.161.72.222/test/sentinel
Example code: And we see error: How to fix this error: Solution 1: use directive resolver example: resolver 8.8.8.8; in block location Solution 2: You…
We use lua-resty-websocket to create websocket server: https://github.com/openresty/lua-resty-websocket Solution: don’t use send_text, should use send_binary
We use lua-resty-websocket to create websocket server: https://github.com/openresty/lua-resty-websocket And we see in log file: Solution: chunk data then send each chunk: We use some value…