I use Openresty 1.4.3.3 and want to use Imagemagick library using magick from Lefao. Settings are made from the description http://leafo.net/posts/creating_an_image_server.html.
In this configuration:
location @image_server_test
{
default_type text/html;
content_by_lua '
ngx.say("test")
local magick = require "magick"
';
}
location ~ ^/imaget/(?<sig>[^/]+)/(?<filename>.*)/(?<pagenumber>.*)/(?<width>[^/]+)$
{
root /var/data/image_cache;
try_files /test.png @image_server_test;
}
In nginx logs get the error:
2013/12/10 04:10:09 [error] 5455#0: *83 lua entry thread aborted: runtime error: [string "content_by_lua"]:3: loop or previous error loading module 'magick'
stack traceback:
coroutine 0:
[C]: in function 'require'
[string "content_by_lua"]:3: in function <[string "content_by_lua"]:1>, client: 192.168.100.1, server: , request: "GET /imaget/725379571b2fd8fa3ab993b155839c1f/411a66c81a0edbe3ea5bb383ff4caf64/1/800 HTTP/1.1", host: "192.168.100.132"
What could be wrong?