Advertisement

nginx+lua支持处理登录验证请求

阅读量:

用于在多台服务器上单点登录SSO、无SESSION,用户身份的验证。

1、安装lua

yum install readline.x86_64 readline-devel.x86_64

  1. wget http://www.lua.org/ftp/lua-5.1.5.tar.gz
  2. make linux
  3. make install

注意:不要使用5.2版本,5.2版本的lua和nginx的整合有问题,编译会报错:

  1. LUA_GLOBALSINDEX' undeclared (first use in this function)

参考: https://github.com/LuaLanes/lanes/issues/18

2、编译nginx

下载lua-nginx-module

  1. 下载GitHub仓库的最新镜像包:https://github.com/chaoslawful/lua-nginx-module/zipball/master。
  2. file master
  3. 解压master镜像包。
  4. mv chaoslawful-lua-nginx-module-06d654b/ lua-nginx-module

下载ngx_devel_kit

  1. 访问该仓库的最新版本:https://github.com/s

全部评论 (0)

还没有任何评论哟~