I use the OpenResty successfully now.
How powerfully it is!
and thank you for your sugguestion about LuaJIT.
But i’ve two problem:
1, how to upgrate the nginx to the latest version, eg: nginx 1.3.1 ?
2, how to add the other third module, eg: nginx_concat_module and
substitutions4nginx ?
set search paths for Lua external libraries written in C (can also use
‘/bar/baz/?.so;/blah/blah/?.so;;’):
This is really a FAQ for Lua beginners, not specific to ngx_lua. In
short, you should really use “/usr/local/lib/lua/?.lua” in your
lua_package_path here instead of “/usr/local/lib/lua/resty/?.lua”
because you’re requiring “resty.memcached” below in your Lua code,
which will make the Lua VM substitute the “?” part in your search path
with the string “resty/memcached” rather than “memcached”.
I suggest you just use the ngx_openresty bundle directly. It has all
the components and search paths properly pre-configured for you But
there’s nothing that can stop you from doing all these configurations
yourself
the require “resty.memcached” code leads the nginx retrun HTTP 500 (500
Internal Server Error)
When you see 500 or empty reply from the server, you should always
check out your nginx’s error.log file for detailed error messages. If
you do, you’ll see from error.log that lua fails to find
resty.memcached in your search paths.
BTW, you’re recommended to use LuaJIT 2.0 instead of the standard Lua
5.1 interpreter with ngx_lua, see:
http://luajit.org/download.html
Because LuaJIT 2.0 is usually much faster and smaller (in terms of
memory footprint) and has many less limitations in terms of
functionalities as compared to the standard Lua 5.1 interpreter.
On Sat, Jun 16, 2012 at 9:46 PM, Xiangong Y. [email protected]
wrote:
Thank you very much! agentzh.
I use the OpenResty successfully now.
How powerfully it is!
Glad you like it
and thank you for your sugguestion about LuaJIT.
You’re welcome
But i’vetwo problem:
1, how to upgrate the nginx to the latest version, eg: nginx 1.3.1 ?
One of the main points of the ngx_openresty bundle is to ensure that
all the bundled components play well with the standard nginx core
bundled. New releases of the Nginx core might break existing 3rd-party
modules. It happens from time to time. Because we’re still testing
compatibility of all the modules with nginx 1.2.x, we’re not ready to
release an ngx_openresty version based on nginx 1.2.x or even 1.3.x.
But you can always replace the bundle/nginx-1.0.15/ directory in
ngx_openresty’s source tree with your own verison of nginx source
tree, like nginx 1.3.1’s, and the ./configure script will just pick it
up. You’re at your own risk though but we’re still very willing to
hear about any problems that you have
2, how to add the other third module, eg: nginx_concat_module and
substitutions4nginx ?
The ./configure script provided by ngx_openresty supports all the
options of the standard nginx’s ./configure options. Just use the
–add-module=PATH option to add your own 3rd-party modules as usual
See ./configure --help for a list of all the options that you can use.
Best regards,
-agentzh
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.