Please enable / Bitte aktiviere JavaScript!
Veuillez activer / Por favor activa el Javascript![ ? ]
What's the catch when you try to enable the module lua-md5 to nginx (details under the cut)? - bug-code.com Q&A

What's the catch when you try to enable the module lua-md5 to nginx (details under the cut)?

0 like 0 dislike
40 views
Hello as in the development environment, a novice(and especially lua) can't understand the issue correct connection of the module lua-md5:
ngx.header["Content-Type"] = "text/plain;charset=utf-8"; local cache_key = ngx.var.lua_purge_upstream .. ngx.var.request_uri; ngx.print(cache_key); local md5 = require 'md5' local md5sum = md5.sumhexa(cache_key); ngx.print(md5sum);

Turning nginx throws an error c
curl: (52) Empty reply from server

What the following works:
ngx.header["Content-Type"] = "text/plain;charset=utf-8"; local cache_key = ngx.var.lua_purge_upstream .. ngx.var.request_uri; ngx.print(cache_key); local md5 = ngx.md5 local md5sum = md5(cache_key); ngx.print(md5sum);

1) Identical to the result of these 2 options or do they differ?
I tried to install the lua md5 module is as follows:
a)
https://centos.pkgs.org/7/epel-x86_64/luarocks-2.3...

luarocks install --server=luarocks.org/manifests/kikito

b)
dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/...

2)But the first method (via module lua-md5)and not earned(it may be necessary to specify some environment variables)?
3) Can you recommend for beginner resources for learning lua on the topic (besides Google of course)?
There is a need to clear the cache of nginx with one file,wildcard, and the entire cache:
https://gist.github.com/nosun/0cfb58d3164f829e2f02...

Thanks in advance
asked by | 40 views

1 Answer

0 like 0 dislike
The first problem was solved by installing:
\rhttps://github.com/keplerproject/md5
1) Commands are identical in result
answered by
Welcome to Bug-code Q&A, where you can ask questions and receive answers from other members of the community.

24.8k questions

46.2k answers

0 comments

12.7k users

24,788 questions
46,220 answers
0 comments
12,715 users