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…
Sample code: Check log: tail /var/log/nginx/error.log Reason: lua-resty-string v0.15 remove EVP_CIPHER_CTX_init Check here Check version in file: /usr/local/share/lua/5.1/resty/string.lua lua-resty-string Version 0.09 You must update to…
Example error: Fix: run this command first: git config --global url."https://".insteadOf git:// Done, retry: now, we have two files xmodem.lua rediscluster.lua in folder /usr/local/share/lua/5.1/resty/