https://github.com/rainingmaster/lua-client-nginx-module
Add a client module to openresty
https://github.com/rainingmaster/lua-client-nginx-module
Last synced: about 1 month ago
JSON representation
Add a client module to openresty
- Host: GitHub
- URL: https://github.com/rainingmaster/lua-client-nginx-module
- Owner: rainingmaster
- Created: 2016-09-27T10:15:31.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-09-30T07:57:07.000Z (over 9 years ago)
- Last Synced: 2025-03-20T15:52:04.564Z (over 1 year ago)
- Language: C
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Name
====
ngx_http_lua_client - Nginx C module to access ngx_lua to execute the Lua code by a client.
Table of Contents
=================
* [Name](#name)
* [Installation](#installation)
* [Directives](#directives)
Installation
============
This module is not default in the Openresty
You can add like :
```
... ...
[http_lua_upstream => 'ngx_lua_upstream'],
[http_lua_client => 'ngx_lua_client'],
[http_headers_more => 'headers-more-nginx-module'],
... ...
```
And add ngx_lua_client* direction in your bundle/, then just `configure` your openresty.
Directives
==========
We have some ngxin setting, to set the connect host and port:
* [lua_client_host](#lua_client_host)
* [lua_client_port](#lua_client_port)
And you can execute the lua-script through below command:
* [execute lua-script](#execute lua-script)
* [execute lua-file](#execute lua-file)
lua_client_host
---------------
**syntax:** *lua_client_host ip*
**default:** *lua_client_host 127.0.0.1*
**context:** *http*
Set the connection host.
lua_client_port
---------------
**syntax:** *lua_client_port port*
**default:** *lua_client_port 8220*
**context:** *http*
Set the connection port.
execute lua-script
-------------
```
./resty-client -h 127.0.0.1 -p 8820 -e lua-script
```
execute lua-file
-------------
```
./resty-client -h 127.0.0.1 -p 8820 -f lua-file
```