mod_lua.xml revision 880f77d700bc15c83bb541a053cd56e89cbfb8bc
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen<?xml version="1.0"?>
fb51a6b789d85113d0976148685b0063c294220drbowen<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
77a0265761f1bec2aaa0b4116c644f8066e349e3rbowen<!-- $LastChangedRevision$ -->
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen<!--
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen Licensed to the Apache Software Foundation (ASF) under one or more
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen contributor license agreements. See the NOTICE file distributed with
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen this work for additional information regarding copyright ownership.
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen The ASF licenses this file to You under the Apache License, Version 2.0
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen (the "License"); you may not use this file except in compliance with
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen the License. You may obtain a copy of the License at
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen http://www.apache.org/licenses/LICENSE-2.0
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen Unless required by applicable law or agreed to in writing, software
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen distributed under the License is distributed on an "AS IS" BASIS,
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen See the License for the specific language governing permissions and
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen limitations under the License.
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen-->
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen
b07b82e44c32825d6226ee801d2ed91555e593d1rbowen<modulesynopsis metafile="mod_lua.xml.meta">
fb51a6b789d85113d0976148685b0063c294220drbowen
fb51a6b789d85113d0976148685b0063c294220drbowen<name>mod_lua</name>
fb51a6b789d85113d0976148685b0063c294220drbowen
4b2d52ed83bf31730c8b6bbe7c06d806dc3a0c4erbowen<description>Provides Lua hooks into various portions of the httpd
4b2d52ed83bf31730c8b6bbe7c06d806dc3a0c4erbowenrequest processing</description>
b75b4bfd9e8ec9fbf28a95174dc0e4d420f744a8sf<status>Experimental</status>
fb51a6b789d85113d0976148685b0063c294220drbowen<sourcefile>mod_lua.c</sourcefile>
fb51a6b789d85113d0976148685b0063c294220drbowen<identifier>lua_module</identifier>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<compatibility>2.3 and later</compatibility>
fb51a6b789d85113d0976148685b0063c294220drbowen
fb51a6b789d85113d0976148685b0063c294220drbowen<summary>
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim<p>This module allows the server to be extended with scripts written in the
889dc1728817c1c56d0c8d894c768614e346d86ecovenerLua programming language. The extension points (hooks) available with
889dc1728817c1c56d0c8d894c768614e346d86ecovener<module>mod_lua</module> include many of the hooks available to
889dc1728817c1c56d0c8d894c768614e346d86ecovenernatively compiled Apache HTTP Server modules, such as mapping requests to
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jimfiles, generating dynamic responses, access control, authentication, and
889dc1728817c1c56d0c8d894c768614e346d86ecovenerauthorization</p>
889dc1728817c1c56d0c8d894c768614e346d86ecovener
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim<p>More information on the Lua programming language can be found at the
889dc1728817c1c56d0c8d894c768614e346d86ecovener<a href="http://www.lua.org/">the Lua website</a>.</p>
fb51a6b789d85113d0976148685b0063c294220drbowen
8548ace6aa09b4d3e463254b53865fb38fbbbc78poirier<note><code>mod_lua</code> is still in experimental state.
8548ace6aa09b4d3e463254b53865fb38fbbbc78poirierUntil it is declared stable, usage and behavior may change
8ad875ad9725307fd052e36abc2938f89f56902csfat any time, even between stable releases of the 2.4.x series.
8ad875ad9725307fd052e36abc2938f89f56902csfBe sure to check the CHANGES file before upgrading.</note>
8548ace6aa09b4d3e463254b53865fb38fbbbc78poirier
e19685ea3d8a2a0754a532b464a3d194c9f9a429humbedooh</summary>
e19685ea3d8a2a0754a532b464a3d194c9f9a429humbedooh
ededb790277bba8f7ae292b5385aecc7ac433105humbedooh<section id="basicconf"><title>Basic Configuration</title>
09a561bcc5c1159de86edf7e644cc9777636211ahumbedooh
e19685ea3d8a2a0754a532b464a3d194c9f9a429humbedooh<p>The basic module loading directive is</p>
e19685ea3d8a2a0754a532b464a3d194c9f9a429humbedooh
e19685ea3d8a2a0754a532b464a3d194c9f9a429humbedooh<example>
fb51a6b789d85113d0976148685b0063c294220drbowen LoadModule lua_module modules/mod_lua.so
fb51a6b789d85113d0976148685b0063c294220drbowen</example>
4b2d52ed83bf31730c8b6bbe7c06d806dc3a0c4erbowen
fb51a6b789d85113d0976148685b0063c294220drbowen<p>
3e30fa5f420fe7302a4cdcd79cb001958fd54a13rbowen<code>mod_lua</code> provides a handler named <code>lua-script</code>,
fb51a6b789d85113d0976148685b0063c294220drbowenwhich can be used with an <code>AddHandler</code> directive:</p>
6265962c731aed3af3aa7242b35852f3f181d437humbedooh
2219c51bf0756c2f6f7deb88a13baf30f141c12epoirier<example>
6265962c731aed3af3aa7242b35852f3f181d437humbedoohAddHandler lua-script .lua
fb51a6b789d85113d0976148685b0063c294220drbowen</example>
4b2d52ed83bf31730c8b6bbe7c06d806dc3a0c4erbowen
4b2d52ed83bf31730c8b6bbe7c06d806dc3a0c4erbowen<p>
4b2d52ed83bf31730c8b6bbe7c06d806dc3a0c4erbowenThis will cause <code>mod_lua</code> to handle requests for files
fb51a6b789d85113d0976148685b0063c294220drbowenending in <code>.lua</code> by invoking that file's
6265962c731aed3af3aa7242b35852f3f181d437humbedooh<code>handle</code> function.
4b2d52ed83bf31730c8b6bbe7c06d806dc3a0c4erbowen</p>
6265962c731aed3af3aa7242b35852f3f181d437humbedooh
fb51a6b789d85113d0976148685b0063c294220drbowen<p>For more flexibility, see <directive>LuaMapHandler</directive>.
4b2d52ed83bf31730c8b6bbe7c06d806dc3a0c4erbowen</p>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier</section>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier
4b2d52ed83bf31730c8b6bbe7c06d806dc3a0c4erbowen<section id="writinghandlers"><title>Writing Handlers</title>
92e5d4326ae44f79da5cb049470daba604506846poirier<p> In the Apache HTTP Server API, the handler is a specific kind of hook
92e5d4326ae44f79da5cb049470daba604506846poirierresponsible for generating the response. Examples of modules that include a
92e5d4326ae44f79da5cb049470daba604506846poirierhandler are <module>mod_proxy</module>, <module>mod_cgi</module>,
92e5d4326ae44f79da5cb049470daba604506846poirierand <module>mod_status</module>.</p>
fb51a6b789d85113d0976148685b0063c294220drbowen
fb51a6b789d85113d0976148685b0063c294220drbowen<p><code>mod_lua</code> always looks to invoke a Lua function for the handler, rather than
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowenjust evaluating a script body CGI style. A handler function looks
889dc1728817c1c56d0c8d894c768614e346d86ecovenersomething like this:</p>
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim
889dc1728817c1c56d0c8d894c768614e346d86ecovener<highlight language="lua">
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowen<strong>example.lua</strong>
889dc1728817c1c56d0c8d894c768614e346d86ecovener-- example handler
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowen
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowenrequire "string"
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowen
880f77d700bc15c83bb541a053cd56e89cbfb8bchumbedooh--[[
880f77d700bc15c83bb541a053cd56e89cbfb8bchumbedooh This is the default method name for Lua handlers, see the optional
991f8cc9d508110a59a25a84f8c8d8d129c49859humbedooh function-name in the LuaMapHandler directive to choose a different
92e5d4326ae44f79da5cb049470daba604506846poirier entry point.
92e5d4326ae44f79da5cb049470daba604506846poirier--]]
92e5d4326ae44f79da5cb049470daba604506846poirierfunction handle(r)
92e5d4326ae44f79da5cb049470daba604506846poirier r.content_type = "text/plain"
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim r:puts("Hello Lua World!\n")
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim if r.method == 'GET' then
cf7d90693f7579700c4f7e663adb83196f903df1covener for k, v in pairs( r:parseargs() ) do
cf7d90693f7579700c4f7e663adb83196f903df1covener r:puts( string.format("%s: %s", k, v) )
cf7d90693f7579700c4f7e663adb83196f903df1covener end
92e5d4326ae44f79da5cb049470daba604506846poirier elseif r.method == 'POST' then
92e5d4326ae44f79da5cb049470daba604506846poirier for k, v in pairs( r:parsebody() ) do
92e5d4326ae44f79da5cb049470daba604506846poirier r:puts( string.format("%s: %s", k, v) )
ced1589c6d84766b80b17671236248cd6b6f2645covener end
92e5d4326ae44f79da5cb049470daba604506846poirier else
a51fa5c4960c597687688fd4a87856d5db51435fhumbedooh r:puts("unknown HTTP method " .. r.method)
8a0b66c25933ca8581954e6600c5b4f1e97dc738humbedooh end
92e5d4326ae44f79da5cb049470daba604506846poirierend
ced1589c6d84766b80b17671236248cd6b6f2645covener</highlight>
92e5d4326ae44f79da5cb049470daba604506846poirier
a51fa5c4960c597687688fd4a87856d5db51435fhumbedooh<p>
92e5d4326ae44f79da5cb049470daba604506846poirierThis handler function just prints out the uri or form encoded
ced1589c6d84766b80b17671236248cd6b6f2645covenerarguments to a plaintext page.
ced1589c6d84766b80b17671236248cd6b6f2645covener</p>
e1fcc3befbb69aab09018a6b8fe15d8816a16076humbedooh
ced1589c6d84766b80b17671236248cd6b6f2645covener<p>
ced1589c6d84766b80b17671236248cd6b6f2645covenerThis means (and in fact encourages) that you can have multiple
ced1589c6d84766b80b17671236248cd6b6f2645covenerhandlers (or hooks, or filters) in the same script.
ced1589c6d84766b80b17671236248cd6b6f2645covener</p>
07c6d4c3b81cce72369dc6e4ecf8b617194e1086covener
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim</section>
07c6d4c3b81cce72369dc6e4ecf8b617194e1086covener
92e5d4326ae44f79da5cb049470daba604506846poirier<section id="writinghooks"><title>Writing Hooks</title>
880f77d700bc15c83bb541a053cd56e89cbfb8bchumbedooh
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowen<p>Hook functions are how modules (and Lua scripts) participate in the
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowenprocessing of requests. Each type of hook exposed by the server exists for
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowena specific purposes such as mapping requests to the filesystem,
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowenperforming access control, or setting mimetypes. General purpose hooks
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowenthat simply run at handy times in the request lifecycle exist as well.</p>
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowen
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowen<p>Hook functions are passed the request object as their only argument.
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowenThey can return any value, depending on the hook, but most commonly
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowenthey'll return OK, DONE, or DECLINED, which you can write in lua as
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowen<code>apache2.OK</code>, <code>apache2.DONE</code>, or
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowen<code>apache2.DECLINED</code>, or else an HTTP status code.</p>
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowen
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowen<highlight language="lua">
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf<strong>translate_name.lua</strong>
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf-- example hook that rewrites the URI to a filesystem path.
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sfrequire 'apache2'
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sffunction translate_name(r)
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf if r.uri == "/translate-name" then
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf r.filename = r.document_root .. "/find_me.txt"
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf return apache2.OK
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf end
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf -- we don't care about this URL, give another module a chance
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf return apache2.DECLINED
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sfend
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf</highlight>
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf<highlight language="lua">
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf<strong>translate_name2.lua</strong>
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf--[[ example hook that rewrites one URI to another URI. It returns a
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf apache2.DECLINED to give other URL mappers a chance to work on the
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf substitution, including the core translate_name hook which maps based
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf on the DocumentRoot.
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf Note: It is currently undefined as to whether this runs before or after
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf mod_alias.
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf--]]
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf
991f8cc9d508110a59a25a84f8c8d8d129c49859humbedoohrequire 'apache2'
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sffunction translate_name(r)
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf if r.uri == "/translate-name" then
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf r.uri = "/find_me.txt"
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf return apache2.DECLINED
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf end
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf return apache2.DECLINED
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sfend
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf</highlight>
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf</section>
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf<section id="datastructures"><title>Data Structures</title>
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf<dl>
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf<dt>request_rec</dt>
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf <dd>
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf <p>The request_rec is mapped in as a userdata. It has a metatable
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf which lets you do useful things with it. For the most part it
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf has the same fields as the request_rec struct (see httpd.h
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf until we get better docs here) many of which are writeable as
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf well as readable. (The table fields' content can be changed, but the
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf fields themselves cannot be set to different tables.)</p>
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf <table border="1">
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf <tr>
e20c6ecbd465cd7dabb44acea6afafc7925f3a03sf <th><strong>Name</strong></th>
92e5d4326ae44f79da5cb049470daba604506846poirier <th><strong>Lua type</strong></th>
92e5d4326ae44f79da5cb049470daba604506846poirier <th><strong>Writable</strong></th>
889dc1728817c1c56d0c8d894c768614e346d86ecovener </tr>
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim <tr>
df26612d249def4d0b228be69bf89d038d6a129ehumbedooh <td><code>ap_auth_type</code></td>
df26612d249def4d0b228be69bf89d038d6a129ehumbedooh <td>string</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>no</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh </tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td><code>args</code></td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>string</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>yes</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh </tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td><code>assbackwards</code></td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>boolean</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>no</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh </tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td><code>canonical_filename</code></td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>string</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>no</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh </tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td><code>content_encoding</code></td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>string</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>no</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh </tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td><code>content_type</code></td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>string</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>yes</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh </tr>
cd9e08003b18a7744c680c07043543b36b941244humbedooh
cd9e08003b18a7744c680c07043543b36b941244humbedooh <tr>
64fdaa4bd37b26a94cf24d544d31e6f39bc6253ehumbedooh <td><code>document_root</code></td>
64fdaa4bd37b26a94cf24d544d31e6f39bc6253ehumbedooh <td>string</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>no</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh </tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td><code>err_headers_out</code></td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>table</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>no</td>
cd9e08003b18a7744c680c07043543b36b941244humbedooh </tr>
cd9e08003b18a7744c680c07043543b36b941244humbedooh <tr>
cd9e08003b18a7744c680c07043543b36b941244humbedooh <td><code>filename</code></td>
cd9e08003b18a7744c680c07043543b36b941244humbedooh <td>string</td>
cd9e08003b18a7744c680c07043543b36b941244humbedooh <td>yes</td>
cd9e08003b18a7744c680c07043543b36b941244humbedooh </tr>
cd9e08003b18a7744c680c07043543b36b941244humbedooh <tr>
cd9e08003b18a7744c680c07043543b36b941244humbedooh <td><code>handler</code></td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>string</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>yes</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh </tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td><code>headers_in</code></td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>table</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>yes</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh </tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td><code>headers_out</code></td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>table</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>yes</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh </tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td><code>hostname</code></td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>string</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>no</td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh </tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <tr>
cc51a7f7ad87c5cc2e0dd1eb4898f3ab9fe16119humbedooh <td><code>method</code></td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>string</td>
cc51a7f7ad87c5cc2e0dd1eb4898f3ab9fe16119humbedooh <td>no</td>
cc51a7f7ad87c5cc2e0dd1eb4898f3ab9fe16119humbedooh </tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <tr>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td><code>notes</code></td>
939b5ecdab2e2265a3915b71862c41f527cce73dhumbedooh <td>table</td>
889dc1728817c1c56d0c8d894c768614e346d86ecovener <td>yes</td>
3d0a46e44a6b200a4a152775adea19a9d9d65ac4humbedooh </tr>
3d0a46e44a6b200a4a152775adea19a9d9d65ac4humbedooh <tr>
3d0a46e44a6b200a4a152775adea19a9d9d65ac4humbedooh <td><code>path_info</code></td>
92e5d4326ae44f79da5cb049470daba604506846poirier <td>string</td>
df26612d249def4d0b228be69bf89d038d6a129ehumbedooh <td>no</td>
92e5d4326ae44f79da5cb049470daba604506846poirier </tr>
92e5d4326ae44f79da5cb049470daba604506846poirier <tr>
92e5d4326ae44f79da5cb049470daba604506846poirier <td><code>protocol</code></td>
991f8cc9d508110a59a25a84f8c8d8d129c49859humbedooh <td>string</td>
880f77d700bc15c83bb541a053cd56e89cbfb8bchumbedooh <td>no</td>
991f8cc9d508110a59a25a84f8c8d8d129c49859humbedooh </tr>
bb57315f942d09c744543fe41e453bd0181fd93ecovener <tr>
bb57315f942d09c744543fe41e453bd0181fd93ecovener <td><code>proxyreq</code></td>
bb57315f942d09c744543fe41e453bd0181fd93ecovener <td>string</td>
bb57315f942d09c744543fe41e453bd0181fd93ecovener <td>yes</td>
bb57315f942d09c744543fe41e453bd0181fd93ecovener </tr>
bb57315f942d09c744543fe41e453bd0181fd93ecovener <tr>
bb57315f942d09c744543fe41e453bd0181fd93ecovener <td><code>range</code></td>
bb57315f942d09c744543fe41e453bd0181fd93ecovener <td>string</td>
bb57315f942d09c744543fe41e453bd0181fd93ecovener <td>no</td>
bb57315f942d09c744543fe41e453bd0181fd93ecovener </tr>
bb57315f942d09c744543fe41e453bd0181fd93ecovener <tr>
bb57315f942d09c744543fe41e453bd0181fd93ecovener <td><code>subprocess_env</code></td>
880f77d700bc15c83bb541a053cd56e89cbfb8bchumbedooh <td>table</td>
bb57315f942d09c744543fe41e453bd0181fd93ecovener <td>yes</td>
991f8cc9d508110a59a25a84f8c8d8d129c49859humbedooh </tr>
880f77d700bc15c83bb541a053cd56e89cbfb8bchumbedooh <tr>
991f8cc9d508110a59a25a84f8c8d8d129c49859humbedooh <td><code>status</code></td>
bb57315f942d09c744543fe41e453bd0181fd93ecovener <td>number</td>
bb57315f942d09c744543fe41e453bd0181fd93ecovener <td>yes</td>
bb57315f942d09c744543fe41e453bd0181fd93ecovener </tr>
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim <tr>
bb57315f942d09c744543fe41e453bd0181fd93ecovener <td><code>the_request</code></td>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh <td>string</td>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh <td>no</td>
bb57315f942d09c744543fe41e453bd0181fd93ecovener </tr>
92e5d4326ae44f79da5cb049470daba604506846poirier <tr>
92e5d4326ae44f79da5cb049470daba604506846poirier <td><code>unparsed_uri</code></td>
92e5d4326ae44f79da5cb049470daba604506846poirier <td>string</td>
92e5d4326ae44f79da5cb049470daba604506846poirier <td>no</td>
92e5d4326ae44f79da5cb049470daba604506846poirier </tr>
92e5d4326ae44f79da5cb049470daba604506846poirier <tr>
92e5d4326ae44f79da5cb049470daba604506846poirier <td><code>uri</code></td>
92e5d4326ae44f79da5cb049470daba604506846poirier <td>string</td>
92e5d4326ae44f79da5cb049470daba604506846poirier <td>yes</td>
92e5d4326ae44f79da5cb049470daba604506846poirier </tr>
880f77d700bc15c83bb541a053cd56e89cbfb8bchumbedooh <tr>
92e5d4326ae44f79da5cb049470daba604506846poirier <td><code>user</code></td>
92e5d4326ae44f79da5cb049470daba604506846poirier <td>string</td>
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowen <td>yes</td>
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowen </tr>
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowen </table>
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowen
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowen <p>The request_rec has (at least) the following methods:</p>
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowen
e27eee5caa6c1bf3853c11253ae82303cff0e40brbowen <example>
df26612d249def4d0b228be69bf89d038d6a129ehumbedooh r:addoutputfilter(name|function) -- add an output filter
92e5d4326ae44f79da5cb049470daba604506846poirier </example>
92e5d4326ae44f79da5cb049470daba604506846poirier
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier <example>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh r:parseargs() -- returns a lua table containing the request's
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier query string arguments
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier </example>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier <example>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier r:parsebody() -- parse the request body as a POST and return
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh a lua table
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier </example>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh <example>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh r:puts("hello", " world", "!") -- print to response body
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh </example>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh <example>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier r:write("a single string") -- print to response body
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier </example>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier </dd>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier </dl>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh</section>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<section id="logging"><title>Logging Functions</title>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<highlight language="lua">
fc57cc74ee4e73618f74a7a62ea6ac77546666dacovener -- examples of logging messages<br />
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh r:trace1("This is a trace log message") -- trace1 through trace8 can be used <br />
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh r:debug("This is a debug log message")<br />
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier r:info("This is an info log message")<br />
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier r:notice("This is an notice log message")<br />
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier r:warn("This is an warn log message")<br />
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier r:err("This is an err log message")<br />
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier r:alert("This is an alert log message")<br />
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh r:crit("This is an crit log message")<br />
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh r:emerg("This is an emerg log message")<br />
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier</highlight>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh</section>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh<section id="apache2"><title>apache2 Package</title>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh<p>A package named <code>apache2</code> is available with (at least) the following contents.</p>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh<dl>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh <dt>apache2.OK</dt>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh <dd>internal constant OK. Handlers should return this if they've
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh handled the request.</dd>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh <dt>apache2.DECLINED</dt>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh <dd>internal constant DECLINED. Handlers should return this if
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh they are not going to handle the request.</dd>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh <dt>apache2.DONE</dt>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh <dd>internal constant DONE.</dd>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh <dt>apache2.version</dt>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh <dd>Apache HTTP server version string</dd>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh <dt>apache2.HTTP_MOVED_TEMPORARILY</dt>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh <dd>HTTP status code</dd>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier <dt>apache2.PROXYREQ_NONE, apache2.PROXYREQ_PROXY, apache2.PROXYREQ_REVERSE, apache2.PROXYREQ_RESPONSE</dt>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier <dd>internal constants used by <module>mod_proxy</module></dd>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier</dl>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<p>(Other HTTP status codes are not yet implemented.)</p>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh</section>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<directivesynopsis>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<name>LuaRoot</name>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<description>Specify the base path for resolving relative paths for mod_lua directives</description>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<syntax>LuaRoot /path/to/a/directory</syntax>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh<contextlist><context>server config</context><context>virtual host</context>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<context>directory</context><context>.htaccess</context>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier</contextlist>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<override>All</override>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<usage>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh <p>Specify the base path which will be used to evaluate all
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh relative paths within mod_lua. If not specified they
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier will be resolved relative to the current working directory,
f5b3f41700a107b9df2b3c5a1cc3e5ea775fd8fesf which may not always work well for a server.</p>
f5b3f41700a107b9df2b3c5a1cc3e5ea775fd8fesf</usage>
f5b3f41700a107b9df2b3c5a1cc3e5ea775fd8fesf</directivesynopsis>
f5b3f41700a107b9df2b3c5a1cc3e5ea775fd8fesf
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh<directivesynopsis>
f5b3f41700a107b9df2b3c5a1cc3e5ea775fd8fesf<name>LuaScope</name>
f5b3f41700a107b9df2b3c5a1cc3e5ea775fd8fesf<description>One of once, request, conn, server -- default is once</description>
f5b3f41700a107b9df2b3c5a1cc3e5ea775fd8fesf<syntax>LuaScope once|request|conn|server [max|min max]</syntax>
f5b3f41700a107b9df2b3c5a1cc3e5ea775fd8fesf<default>LuaScope once</default>
f5b3f41700a107b9df2b3c5a1cc3e5ea775fd8fesf<contextlist><context>server config</context><context>virtual host</context>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh<context>directory</context><context>.htaccess</context>
f5b3f41700a107b9df2b3c5a1cc3e5ea775fd8fesf</contextlist>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<override>All</override>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<usage>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier <p>Specify the lifecycle scope of the Lua interpreter which will
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier be used by handlers in this "Directory." The default is "once"</p>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier <dl>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier <dt>once:</dt> <dd>use the interpreter once and throw it away.</dd>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier <dt>request:</dt> <dd>use the interpreter to handle anything based on
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier the same file within this request, which is also
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh request scoped.</dd>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier <dt>conn:</dt> <dd>Same as request but attached to the connection_rec</dd>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier <dt>server:</dt> <dd>This one is different than others because the
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier server scope is quite long lived, and multiple threads
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier will have the same server_rec. To accommodate this
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh server scoped interpreter are stored in an apr
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh resource list. The min and max arguments are intended
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh to specify the pool size, but are unused at this time.</dd>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier </dl>
7152f5d04e3782c5e93016ae2ccd960f8538b83bcovener</usage>
7152f5d04e3782c5e93016ae2ccd960f8538b83bcovener</directivesynopsis>
7152f5d04e3782c5e93016ae2ccd960f8538b83bcovener
7152f5d04e3782c5e93016ae2ccd960f8538b83bcovener<directivesynopsis>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh<name>LuaMapHandler</name>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh<description>Map a path to a lua handler</description>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh<syntax>LuaMapHandler uri-pattern /path/to/lua/script.lua [function-name]</syntax>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh<contextlist><context>server config</context><context>virtual host</context>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh<context>directory</context><context>.htaccess</context>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh</contextlist>
7152f5d04e3782c5e93016ae2ccd960f8538b83bcovener<override>All</override>
7152f5d04e3782c5e93016ae2ccd960f8538b83bcovener<usage>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier <p>This directive matches a uri pattern to invoke a specific
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier handler function in a specific file. It uses PCRE regular
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier expressions to match the uri, and supports interpolating
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier match groups into both the file path and the function name
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh be careful writing your regular expressions to avoid security
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh issues.</p>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier <example><title>Examples:</title>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier LuaMapHandler /(\w+)/(/w+) /scripts/$1.lua handle_$2
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier </example>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier <p>This would match uri's such as /photos/show?id=9
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier to the file /scripts/photos.lua and invoke the
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh handler function handle_show on the lua vm after
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier loading that file.</p>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<example>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier LuaMapHandler /bingo /scripts/wombat.lua
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier</example>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh <p>This would invoke the "handle" function, which
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh is the default if no specific function name is
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh provided.</p>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh</usage>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh</directivesynopsis>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh<directivesynopsis>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<name>LuaPackagePath</name>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh<description>Add a directory to lua's package.path</description>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh<syntax>LuaPackagePath /path/to/include/?.lua</syntax>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh<contextlist><context>server config</context><context>virtual host</context>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh<context>directory</context><context>.htaccess</context>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh</contextlist>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh<override>All</override>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh <usage><p>Add a path to lua's module search path. Follows the same
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh conventions as lua. This just munges the package.path in the
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh lua vms.</p>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh <example><title>Examples:</title>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh LuaPackagePath /scripts/lib/?.lua<br />
f5b3f41700a107b9df2b3c5a1cc3e5ea775fd8fesf LuaPackagePath /scripts/lib/?/init.lua
f5b3f41700a107b9df2b3c5a1cc3e5ea775fd8fesf </example>
f5b3f41700a107b9df2b3c5a1cc3e5ea775fd8fesf</usage>
f5b3f41700a107b9df2b3c5a1cc3e5ea775fd8fesf</directivesynopsis>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh
f5b3f41700a107b9df2b3c5a1cc3e5ea775fd8fesf<directivesynopsis>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<name>LuaPackageCPath</name>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<description>Add a directory to lua's package.cpath</description>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<syntax>LuaPackageCPath /path/to/include/?.soa</syntax>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<contextlist><context>server config</context><context>virtual host</context>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh<context>directory</context><context>.htaccess</context>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier</contextlist>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<override>All</override>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<usage>
92e5d4326ae44f79da5cb049470daba604506846poirier <p>Add a path to lua's shared library search path. Follows the same
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh conventions as lua. This just munges the package.cpath in the
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier lua vms.</p>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh</usage>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh</directivesynopsis>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh<directivesynopsis>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh<name>LuaCodeCache</name>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<description>Configure the compiled code cache.</description>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<syntax>LuaCodeCache stat|forever|never</syntax>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<default>LuaCodeCache stat</default>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<contextlist><context>server config</context><context>virtual host</context>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh<context>directory</context><context>.htaccess</context>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier</contextlist>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh<override>All</override>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh<usage><p>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh Specify the behavior of the in-memory code cache. The default
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh is stat, which stats the top level script (not any included
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh ones) each time that file is needed, and reloads it if the
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier modified time indicates it is newer than the one it has
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier already loaded. The other values cause it to keep the file
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier cached forever (don't stat and replace) or to never cache the
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier file.</p>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier <p>In general stat or forever is good for production, and stat or never
7152f5d04e3782c5e93016ae2ccd960f8538b83bcovener for development.</p>
7152f5d04e3782c5e93016ae2ccd960f8538b83bcovener
7152f5d04e3782c5e93016ae2ccd960f8538b83bcovener <example><title>Examples:</title>
7152f5d04e3782c5e93016ae2ccd960f8538b83bcovener LuaCodeCache stat<br />
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh LuaCodeCache forever<br />
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh LuaCodeCache never<br />
7152f5d04e3782c5e93016ae2ccd960f8538b83bcovener </example>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier</usage>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier</directivesynopsis>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh<directivesynopsis>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<name>LuaHookTranslateName</name>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh<description>Provide a hook for the translate name phase of request processing</description>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh<syntax>LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]</syntax>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh<contextlist><context>server config</context><context>virtual host</context>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh<context>directory</context>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh</contextlist>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh<override>All</override>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh<compatibility>The optional third argument is supported in 2.3.15 and later</compatibility>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh<usage><p>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh Add a hook (at APR_HOOK_MIDDLE) to the translate name phase of
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh request processing. The hook function receives a single
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh argument, the request_rec, and should return a status code,
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh which is either an HTTP error code, or the constants defined
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh in the apache2 module: apache2.OK, apache2.DECLINED, or
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh apache2.DONE. </p>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh <p>For those new to hooks, basically each hook will be invoked
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh until one of them returns apache2.OK. If your hook doesn't
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh want to do the translation it should just return
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh apache2.DECLINED. If the request should stop processing, then
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh return apache2.DONE.</p>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh <p>Example:</p>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh
8230057b2a5c382433ec1d7a9d1e3f1bb1daa87acovener<example><pre>
8230057b2a5c382433ec1d7a9d1e3f1bb1daa87acovener# httpd.conf
8230057b2a5c382433ec1d7a9d1e3f1bb1daa87acovenerLuaHookTranslateName /scripts/conf/hooks.lua silly_mapper
8230057b2a5c382433ec1d7a9d1e3f1bb1daa87acovener</pre></example>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh
8230057b2a5c382433ec1d7a9d1e3f1bb1daa87acovener<highlight language="lua">
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh-- /scripts/conf/hooks.lua --
10961a2f60207cb873d889bb28b1f0ef707a4311humbedoohrequire "apache2"
10961a2f60207cb873d889bb28b1f0ef707a4311humbedoohfunction silly_mapper(r)
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh if r.uri == "/" then
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh r.filename = "/var/www/home.lua"
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh return apache2.OK
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier else
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier return apache2.DECLINED
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier end
249cc9b3d83d3c60666269b90ecb9f1390d32165poirierend
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh</highlight>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier <note><title>Context</title><p>This directive is not valid in <directive
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier type="section" module="core">Directory</directive>, <directive
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier type="section" module="core">Files</directive>, or htaccess
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier context.</p></note>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier <note><title>Ordering</title><p>The optional arguments "early" or "late"
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier control when this script runs relative to other modules.</p></note>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier</usage>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier</directivesynopsis>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<directivesynopsis>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<name>LuaHookFixups</name>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<description>Provide a hook for the fixups phase of request
249cc9b3d83d3c60666269b90ecb9f1390d32165poirierprocessing</description>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<syntax>LuaHookFixups /path/to/lua/script.lua hook_function_name</syntax>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh<contextlist><context>server config</context><context>virtual host</context>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<context>directory</context><context>.htaccess</context>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier</contextlist>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<override>All</override>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<usage>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<p>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh Just like LuaHookTranslateName, but executed at the fixups phase
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier</p>
f5b3f41700a107b9df2b3c5a1cc3e5ea775fd8fesf</usage>
f5b3f41700a107b9df2b3c5a1cc3e5ea775fd8fesf</directivesynopsis>
f5b3f41700a107b9df2b3c5a1cc3e5ea775fd8fesf
f5b3f41700a107b9df2b3c5a1cc3e5ea775fd8fesf<directivesynopsis>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh<name>LuaHookMapToStorage</name>
f5b3f41700a107b9df2b3c5a1cc3e5ea775fd8fesf<description>Provide a hook for the map_to_storage phase of request processing</description>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier<syntax>LuaHookMapToStorage /path/to/lua/script.lua hook_function_name</syntax>
887ddb3e9bc5857cf9ce17263be412c6d8339c03humbedooh<contextlist><context>server config</context><context>virtual host</context>
887ddb3e9bc5857cf9ce17263be412c6d8339c03humbedooh<context>directory</context><context>.htaccess</context>
887ddb3e9bc5857cf9ce17263be412c6d8339c03humbedooh</contextlist>
887ddb3e9bc5857cf9ce17263be412c6d8339c03humbedooh<override>All</override>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier <usage><p>...</p></usage>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh</directivesynopsis>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<directivesynopsis>
df26612d249def4d0b228be69bf89d038d6a129ehumbedooh<name>LuaHookCheckUserID</name>
df26612d249def4d0b228be69bf89d038d6a129ehumbedooh<description>Provide a hook for the check_user_id phase of request processing</description>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh<syntax>LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]</syntax>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<contextlist><context>server config</context><context>virtual host</context>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<context>directory</context><context>.htaccess</context>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh</contextlist>
b66799a0f022c583e1ef6ea7b3e886151dce3f9dfuankg<override>All</override>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<compatibility>The optional third argument is supported in 2.3.15 and later</compatibility>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<usage><p>...</p>
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim <note><title>Ordering</title><p>The optional arguments "early" or "late"
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh control when this script runs relative to other modules.</p></note>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh</usage>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh</directivesynopsis>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<directivesynopsis>
65305d236fe992253daa6ee6b3176a8e0e2d87e1humbedooh<name>LuaHookTypeChecker</name>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<description>Provide a hook for the type_checker phase of request processing</description>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<syntax>LuaHookTypeChecker /path/to/lua/script.lua hook_function_name</syntax>
65305d236fe992253daa6ee6b3176a8e0e2d87e1humbedooh<contextlist><context>server config</context><context>virtual host</context>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<context>directory</context><context>.htaccess</context>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh</contextlist>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<override>All</override>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh <usage><p>...</p></usage>
249cc9b3d83d3c60666269b90ecb9f1390d32165poirier</directivesynopsis>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh
ef9c39be3d095e25d3a9fe681d7b9c5400506e5fhumbedooh<directivesynopsis>
ef9c39be3d095e25d3a9fe681d7b9c5400506e5fhumbedooh<name>LuaHookAuthChecker</name>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<description>Provide a hook for the auth_checker phase of request processing</description>
ef9c39be3d095e25d3a9fe681d7b9c5400506e5fhumbedooh<syntax>LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]</syntax>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<contextlist><context>server config</context><context>virtual host</context>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<context>directory</context><context>.htaccess</context>
1abe2f0d024bcb5d099cef68af06781da4e3270bhumbedooh</contextlist>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<override>All</override>
ef9c39be3d095e25d3a9fe681d7b9c5400506e5fhumbedooh<compatibility>The optional third argument is supported in 2.3.15 and later</compatibility>
ef9c39be3d095e25d3a9fe681d7b9c5400506e5fhumbedooh<usage>
ef9c39be3d095e25d3a9fe681d7b9c5400506e5fhumbedooh<p>Invoke a lua function in the auth_checker phase of processing
ef9c39be3d095e25d3a9fe681d7b9c5400506e5fhumbedooha request. This can be used to implement arbitrary authentication
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedoohand authorization checking. A very simple example:
ef9c39be3d095e25d3a9fe681d7b9c5400506e5fhumbedooh</p>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<highlight language="lua">
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedoohrequire 'apache2'
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh-- fake authcheck hook
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh-- If request has no auth info, set the response header and
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh-- return a 401 to ask the browser for basic auth info.
e53ae81ffa6d05c08191384c5c6040dee6d1d7d2humbedooh-- If request has auth info, don't actually look at it, just
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh-- pretend we got userid 'foo' and validated it.
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh-- Then check if the userid is 'foo' and accept the request.
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedoohfunction authcheck_hook(r)
e53ae81ffa6d05c08191384c5c6040dee6d1d7d2humbedooh
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh -- look for auth info
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh auth = r.headers_in['Authorization']
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh if auth ~= nil then
e53ae81ffa6d05c08191384c5c6040dee6d1d7d2humbedooh -- fake the user
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh r.user = 'foo'
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh end
e53ae81ffa6d05c08191384c5c6040dee6d1d7d2humbedooh
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh if r.user == nil then
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh r:debug("authcheck: user is nil, returning 401")
e53ae81ffa6d05c08191384c5c6040dee6d1d7d2humbedooh r.err_headers_out['WWW-Authenticate'] = 'Basic realm="WallyWorld"'
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh return 401
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh elseif r.user == "foo" then
e53ae81ffa6d05c08191384c5c6040dee6d1d7d2humbedooh r:debug('user foo: OK')
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh else
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh r:debug("authcheck: user='" .. r.user .. "'")
e53ae81ffa6d05c08191384c5c6040dee6d1d7d2humbedooh r.err_headers_out['WWW-Authenticate'] = 'Basic realm="WallyWorld"'
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh return 401
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh end
e53ae81ffa6d05c08191384c5c6040dee6d1d7d2humbedooh return apache2.OK
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedoohend
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh</highlight>
e53ae81ffa6d05c08191384c5c6040dee6d1d7d2humbedooh <note><title>Ordering</title><p>The optional arguments "early" or "late"
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh control when this script runs relative to other modules.</p></note>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh</usage>
e53ae81ffa6d05c08191384c5c6040dee6d1d7d2humbedooh</directivesynopsis>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<directivesynopsis>
e53ae81ffa6d05c08191384c5c6040dee6d1d7d2humbedooh<name>LuaHookAccessChecker</name>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<description>Provide a hook for the access_checker phase of request processing</description>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<syntax>LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]</syntax>
e53ae81ffa6d05c08191384c5c6040dee6d1d7d2humbedooh<contextlist><context>server config</context><context>virtual host</context>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<context>directory</context><context>.htaccess</context>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh</contextlist>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<override>All</override>
e53ae81ffa6d05c08191384c5c6040dee6d1d7d2humbedooh<compatibility>The optional third argument is supported in 2.3.15 and later</compatibility>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<usage>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<p>Add your hook to the access_checker phase. An access checker
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedoohhook function usually returns OK, DECLINED, or HTTP_FORBIDDEN.</p>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh <note><title>Ordering</title><p>The optional arguments "early" or "late"
419966e1a7019b758486432515281fa570920866fuankg control when this script runs relative to other modules.</p></note>
419966e1a7019b758486432515281fa570920866fuankg</usage>
419966e1a7019b758486432515281fa570920866fuankg</directivesynopsis>
419966e1a7019b758486432515281fa570920866fuankg
419966e1a7019b758486432515281fa570920866fuankg<directivesynopsis>
419966e1a7019b758486432515281fa570920866fuankg<name>LuaHookInsertFilter</name>
419966e1a7019b758486432515281fa570920866fuankg<description>Provide a hook for the insert_filter phase of request processing</description>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<syntax>LuaHookInsertFilter /path/to/lua/script.lua hook_function_name</syntax>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<contextlist><context>server config</context><context>virtual host</context>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<context>directory</context><context>.htaccess</context>
f193d325b0241c29fdd45cce7e1458b11324677cfuankg</contextlist>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<override>All</override>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh <usage><p>Not Yet Implemented</p></usage>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh</directivesynopsis>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<directivesynopsis>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<name>LuaInherit</name>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<description>Controls how parent configuration sections are merged into children</description>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<syntax>LuaInherit none|parent-first|parent-last</syntax>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<default>LuaInherit parent-first</default>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<contextlist><context>server config</context><context>virtual host</context>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<context>directory</context><context>.htaccess</context>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh</contextlist>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<override>All</override>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<compatibility>2.4.0 and later</compatibility>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh <usage><p>By default, if LuaHook* directives are used in overlapping
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh Directory or Location configuration sections, the scripts defined in the
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh more specific section are run <em>after</em> those defined in the more
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh generic section (LuaInherit parent-first). You can reverse this order, or
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh make the parent context not apply at all.</p>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh <p> In previous 2.3.x releases, the default was effectively to ignore LuaHook*
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh directives from parent configuration sections.</p></usage>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh</directivesynopsis>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<directivesynopsis>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<name>LuaQuickHandler</name>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<description>Provide a hook for the quick handler of request processing</description>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<syntax></syntax>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<contextlist><context>server config</context><context>virtual host</context>
e53ae81ffa6d05c08191384c5c6040dee6d1d7d2humbedooh<context>directory</context><context>.htaccess</context>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh</contextlist>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<override>All</override>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh<usage><p>...</p>
e53ae81ffa6d05c08191384c5c6040dee6d1d7d2humbedooh <note><title>Context</title><p>This directive is not valid in <directive
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh type="section" module="core">Directory</directive>, <directive
e53ae81ffa6d05c08191384c5c6040dee6d1d7d2humbedooh type="section" module="core">Files</directive>, or htaccess
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh context.</p></note>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh</usage>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh</directivesynopsis>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh</modulesynopsis>
7c3e1c5ca4a644b99873755515503db42b869a4bhumbedooh