From: Daniel Gruno
@@ -47,11 +47,6 @@ authorization
-Description: Provides Lua hooks into various portions of the httpd
request processing
+Status: Experimental Status: Extension Module Identifier: lua_module Source File: mod_lua.c Compatibility: 2.3 and later
More information on the Lua programming language can be found at the the Lua website.
-mod_lua is still in experimental state.
-Until it is declared stable, usage and behavior may change
-at any time, even between stable releases of the 2.4.x series.
-Be sure to check the CHANGES file before upgrading.This module holds a great deal of power over httpd, which is both a strength and a potential security risk. It is not recommended @@ -100,7 +95,7 @@ trust, as it can be abused to change the internal workings of httpd.
The basic module loading directive is
@@ -128,7 +123,7 @@ ending in.lua by invoking that file's
In the Apache HTTP Server API, the handler is a specific kind of hook
responsible for generating the response. Examples of modules that include a
handler are mod_proxy, mod_cgi,
@@ -188,7 +183,7 @@ handlers (or hooks, or filters) in the same script.
mod_authz_core provides a high-level interface to
@@ -241,7 +236,7 @@ end
Hook functions are how modules (and Lua scripts) participate in the processing of requests. Each type of hook exposed by the server exists for @@ -368,7 +363,7 @@ end
The request_rec object has (at least) the following methods:
@@ -1023,7 +1018,7 @@ local line = r:wsread()-- examples of logging messages
r:trace1("This is a trace log message") -- trace1 through trace8 can be used
@@ -1039,7 +1034,7 @@ r:emerg("This is an emerg log message")
A package named apache2 is available with (at least) the following contents.
(Other HTTP status codes are not yet implemented.)
Filter functions implemented via LuaInputFilter
@@ -1102,7 +1097,7 @@ end
Mod_lua implements a simple database feature for querying and running commands @@ -1256,13 +1251,13 @@ collectgarbage() -- close the handle via GC
| Description: | Plug an authorization provider function into mod_authz_core
|
|---|---|
| Syntax: | LuaAuthzProvider provider_name /path/to/lua/script.lua function_name |
| Context: | server config |
| Status: | Experimental |
| Status: | Extension |
| Module: | mod_lua |
| Compatibility: | 2.4.3 and later |
| Description: | Configure the compiled code cache. |
|---|---|
| Syntax: | LuaCodeCache stat|forever|never |
| Default: | LuaCodeCache stat |
| Context: | server config, virtual host, directory, .htaccess |
| Override: | All |
| Status: | Experimental |
| Status: | Extension |
| Module: | mod_lua |
Specify the behavior of the in-memory code cache. The default @@ -1315,13 +1310,13 @@ LuaCodeCache never
| Description: | Provide a hook for the access_checker phase of request processing |
|---|---|
| Syntax: | LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late] |
| Context: | server config, virtual host, directory, .htaccess |
| Override: | All |
| Status: | Experimental |
| Status: | Extension |
| Module: | mod_lua |
| Compatibility: | The optional third argument is supported in 2.3.15 and later |
| Description: | Provide a hook for the auth_checker phase of request processing |
|---|---|
| Syntax: | LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late] |
| Context: | server config, virtual host, directory, .htaccess |
| Override: | All |
| Status: | Experimental |
| Status: | Extension |
| Module: | mod_lua |
| Compatibility: | The optional third argument is supported in 2.3.15 and later |
| Description: | Provide a hook for the check_user_id phase of request processing |
|---|---|
| Syntax: | LuaHookCheckUserID /path/to/lua/script.lua hook_function_name |
| Context: | server config, virtual host, directory, .htaccess |
| Override: | All |
| Status: | Experimental |
| Status: | Extension |
| Module: | mod_lua |
| Description: | Provide a hook for the fixups phase of a request processing |
|---|---|
| Syntax: | LuaHookFixups /path/to/lua/script.lua hook_function_name |
| Context: | server config, virtual host, directory, .htaccess |
| Override: | All |
| Status: | Experimental |
| Status: | Extension |
| Module: | mod_lua |
@@ -1409,25 +1404,25 @@ processing
| Description: | Provide a hook for the insert_filter phase of request processing |
|---|---|
| Syntax: | LuaHookInsertFilter /path/to/lua/script.lua hook_function_name |
| Context: | server config, virtual host, directory, .htaccess |
| Override: | All |
| Status: | Experimental |
| Status: | Extension |
| Module: | mod_lua |
Not Yet Implemented
| Description: | Provide a hook for the access log phase of a request processing |
|---|---|
| Syntax: | LuaHookLog /path/to/lua/script.lua log_function_name |
| Context: | server config, virtual host, directory, .htaccess |
| Override: | All |
| Status: | Experimental |
| Status: | Extension |
| Module: | mod_lua |
@@ -1466,13 +1461,13 @@ end
| Description: | Provide a hook for the map_to_storage phase of request processing |
|---|---|
| Syntax: | LuaHookMapToStorage /path/to/lua/script.lua hook_function_name |
| Context: | server config, virtual host, directory, .htaccess |
| Override: | All |
| Status: | Experimental |
| Status: | Extension |
| Module: | mod_lua |
Like LuaHookTranslateName but executed at the
@@ -1514,13 +1509,13 @@ end
| Description: | Provide a hook for the translate name phase of request processing |
|---|---|
| Syntax: | LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late] |
| Context: | server config, virtual host |
| Override: | All |
| Status: | Experimental |
| Status: | Extension |
| Module: | mod_lua |
| Compatibility: | The optional third argument is supported in 2.3.15 and later |
@@ -1564,13 +1559,13 @@ end
| Description: | Provide a hook for the type_checker phase of request processing |
|---|---|
| Syntax: | LuaHookTypeChecker /path/to/lua/script.lua hook_function_name |
| Context: | server config, virtual host, directory, .htaccess |
| Override: | All |
| Status: | Experimental |
| Status: | Extension |
| Module: | mod_lua |
This directive provides a hook for the type_checker phase of the request processing. @@ -1593,14 +1588,14 @@ end
| Description: | Controls how parent configuration sections are merged into children |
|---|---|
| Syntax: | LuaInherit none|parent-first|parent-last |
| Default: | LuaInherit parent-first |
| Context: | server config, virtual host, directory, .htaccess |
| Override: | All |
| Status: | Experimental |
| Status: | Extension |
| Module: | mod_lua |
| Compatibility: | 2.4.0 and later |
By default, if LuaHook* directives are used in overlapping @@ -1613,13 +1608,13 @@ end directives from parent configuration sections.
| Description: | Provide a Lua function for content input filtering |
|---|---|
| Syntax: | LuaInputFilter filter_name /path/to/lua/script.lua function_name |
| Context: | server config |
| Override: | All |
| Status: | Experimental |
| Status: | Extension |
| Module: | mod_lua |
| Compatibility: | 2.4.5 and later |
| Description: | Map a path to a lua handler |
|---|---|
| Syntax: | LuaMapHandler uri-pattern /path/to/lua/script.lua [function-name] |
| Context: | server config, virtual host, directory, .htaccess |
| Override: | All |
| Status: | Experimental |
| Status: | Extension |
| Module: | mod_lua |
This directive matches a uri pattern to invoke a specific @@ -1699,13 +1694,13 @@ filters" for more information.
| Description: | Provide a Lua function for content output filtering |
|---|---|
| Syntax: | LuaOutputFilter filter_name /path/to/lua/script.lua function_name |
| Context: | server config |
| Override: | All |
| Status: | Experimental |
| Status: | Extension |
| Module: | mod_lua |
| Compatibility: | 2.4.5 and later |
| Description: | Add a directory to lua's package.cpath |
|---|---|
| Syntax: | LuaPackageCPath /path/to/include/?.soa |
| Context: | server config, virtual host, directory, .htaccess |
| Override: | All |
| Status: | Experimental |
| Status: | Extension |
| Module: | mod_lua |
Add a path to lua's shared library search path. Follows the same @@ -1778,13 +1773,13 @@ information.
| Description: | Add a directory to lua's package.path |
|---|---|
| Syntax: | LuaPackagePath /path/to/include/?.lua |
| Context: | server config, virtual host, directory, .htaccess |
| Override: | All |
| Status: | Experimental |
| Status: | Extension |
| Module: | mod_lua |
Add a path to lua's module search path. Follows the same conventions as lua. This just munges the package.path in the @@ -1796,13 +1791,13 @@ LuaPackagePath /scripts/lib/?/init.lua
| Description: | Provide a hook for the quick handler of request processing |
|---|---|
| Syntax: | LuaQuickHandler /path/to/script.lua hook_function_name |
| Context: | server config, virtual host |
| Override: | All |
| Status: | Experimental |
| Status: | Extension |
| Module: | mod_lua |
@@ -1817,13 +1812,13 @@ LuaPackagePath /scripts/lib/?/init.lua
| Description: | Specify the base path for resolving relative paths for mod_lua directives |
|---|---|
| Syntax: | LuaRoot /path/to/a/directory |
| Context: | server config, virtual host, directory, .htaccess |
| Override: | All |
| Status: | Experimental |
| Status: | Extension |
| Module: | mod_lua |
Specify the base path which will be used to evaluate all @@ -1833,14 +1828,14 @@ LuaPackagePath /scripts/lib/?/init.lua
| Description: | One of once, request, conn, thread -- default is once |
|---|---|
| Syntax: | LuaScope once|request|conn|thread|server [min] [max] |
| Default: | LuaScope once |
| Context: | server config, virtual host, directory, .htaccess |
| Override: | All |
| Status: | Experimental |
| Status: | Extension |
| Module: | mod_lua |
Specify the life cycle scope of the Lua interpreter which will
diff --git a/docs/manual/mod/mod_lua.xml b/docs/manual/mod/mod_lua.xml
index b877335e04c..4bdfe947b54 100644
--- a/docs/manual/mod/mod_lua.xml
+++ b/docs/manual/mod/mod_lua.xml
@@ -26,7 +26,7 @@
More information on the Lua programming language can be found at the the Lua website.
-mod_lua is still in experimental state.
-Until it is declared stable, usage and behavior may change
-at any time, even between stable releases of the 2.4.x series.
-Be sure to check the CHANGES file before upgrading.This module holds a great deal of power over httpd, which is both a strength and a potential security risk. It is not recommended