nginx-lua-ds-loadbalancer 是一个HTTP负载均衡器,基于liseen/lua-resty-http
A http loadbalancer which is based on liseen/lua-resty-http
将代码放在位于nginx根目录下的lua/ds_lb/下
Put the code into the directory lua/ds_lb which is located in the root directory of the nginx
在nginx.conf的http段中添加如下配置:
Add the config below to the http seg in nginx.conf:
lua_package_path "/u/nginx/lua/ds_lb/?.lua;;"; lua_need_request_body on; init_by_lua_file lua/ds_lb/init.lua;
在nginx.conf的location段中添加如下配置:
Add the config below to the location seg in nginx.conf:
location / { content_by_lua_file lua/ds_lb/lb.lua; }
负载均衡器的配置在config.lua中
You can config loadbalancer with the file config.lua
可以自己定制调度策略,只需在sched文件夹下创建相关的调度策略文件,在其中提供get_selected_server()函数即可
You can custom your sched strategy by just creating the sched file in the "sched" directory,and provide the function get_selected_server()
nginx-lua-ds-proxy 是一个HTTP代理服务器,基于 liseen/lua-resty-http 将代码放在位于nginx根目录下的lua/ds_proxy/下 在nginx.conf的http段中添加如下配置: lua_package_path "/u/nginx/lua/ds_proxy/?.lua;;";lua_need_request_body on;init_by_lua
基于nginx和lua的防盗链系统 A Prevent Hotlinking System based on nginx and lua 将代码放在位于nginx根目录下的lua/ds_hotlink/下 Put the code into the directory lua/ds_hotlink which is located in the root directory of the ngin
nginx-lua-ds-waf 是基于 Nginx 和 Lua 的 WAF 系统 将代码放在位于nginx根目录下的lua/ds_waf/下 在nginx.conf的http段中添加如下配置: lua_package_path "/u/nginx/lua/ds_waf/?.lua;;";init_by_lua_file lua/ds_waf/init.lua;access_by_lua_file
This module embeds the Lua interpreter or LuaJIT into the nginx core and integrates the powerful Lua threads (aka Lua coroutines) into the nginx event model by means of nginx subrequests. Unlike Apach
Nginx与Lua编写脚本的基本构建块是指令执行顺序的图 Nginx 教程 基础 Nginx编译安装 Nginx.conf详解 Location 详解 Nginx基础知识 Nginx高性能WEB服务器详解 Nginx高并发系统内核优化和PHP7配置文件优化 Nginx和PHP-FPM启动脚本 Nginx的11个Phases agentzh 的 Nginx 教程 Nginx 陷阱和常见错误 TCP和
lua-nginx-module (ngx_lua) 可在 Nginx 中嵌入 Lua 语言。让 Nginx 可以支持 Lua 强大的语法。 概要: # set search paths for pure Lua external libraries (';;' is the default path): lua_package_path '/foo/bar/?.lua;/blah/?.lua;