]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_lua.html.en
xforms
[apache] / docs / manual / mod / mod_lua.html.en
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5               This file is generated from xml source: DO NOT EDIT
6         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7       -->
8 <title>mod_lua - Apache HTTP Server</title>
9 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
12 <script src="../style/scripts/prettify.js" type="text/javascript">
13 </script>
14
15 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
16 <body>
17 <div id="page-header">
18 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
19 <p class="apache">Apache HTTP Server Version 2.5</p>
20 <img alt="" src="../images/feather.gif" /></div>
21 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
22 <div id="path">
23 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.5</a> &gt; <a href="./">Modules</a></div>
24 <div id="page-content">
25 <div id="preamble"><h1>Apache Module mod_lua</h1>
26 <div class="toplang">
27 <p><span>Available Languages: </span><a href="../en/mod/mod_lua.html" title="English">&nbsp;en&nbsp;</a> |
28 <a href="../fr/mod/mod_lua.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a></p>
29 </div>
30 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Provides Lua hooks into various portions of the httpd
31 request processing</td></tr>
32 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
33 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>lua_module</td></tr>
34 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_lua.c</td></tr>
35 <tr><th><a href="module-dict.html#Compatibility">Compatibility:</a></th><td>2.3 and later</td></tr></table>
36 <h3>Summary</h3>
37
38 <p>This module allows the server to be extended with scripts written in the
39 Lua programming language.  The extension points (hooks) available with
40 <code class="module"><a href="../mod/mod_lua.html">mod_lua</a></code> include many of the hooks available to
41 natively compiled Apache HTTP Server modules, such as mapping requests to
42 files, generating dynamic responses, access control, authentication, and
43 authorization</p>
44
45 <p>More information on the Lua programming language can be found at the
46 <a href="http://www.lua.org/">the Lua website</a>.</p>
47
48 <div class="note"><code>mod_lua</code> is still in experimental state.
49 Until it is declared stable, usage and behavior may change
50 at any time, even between stable releases of the 2.4.x series.
51 Be sure to check the CHANGES file before upgrading.</div>
52
53 </div>
54 <div id="quickview"><h3 class="directives">Directives</h3>
55 <ul id="toc">
56 <li><img alt="" src="../images/down.gif" /> <a href="#luaauthzprovider">LuaAuthzProvider</a></li>
57 <li><img alt="" src="../images/down.gif" /> <a href="#luacodecache">LuaCodeCache</a></li>
58 <li><img alt="" src="../images/down.gif" /> <a href="#luahookaccesschecker">LuaHookAccessChecker</a></li>
59 <li><img alt="" src="../images/down.gif" /> <a href="#luahookauthchecker">LuaHookAuthChecker</a></li>
60 <li><img alt="" src="../images/down.gif" /> <a href="#luahookcheckuserid">LuaHookCheckUserID</a></li>
61 <li><img alt="" src="../images/down.gif" /> <a href="#luahookfixups">LuaHookFixups</a></li>
62 <li><img alt="" src="../images/down.gif" /> <a href="#luahookinsertfilter">LuaHookInsertFilter</a></li>
63 <li><img alt="" src="../images/down.gif" /> <a href="#luahookmaptostorage">LuaHookMapToStorage</a></li>
64 <li><img alt="" src="../images/down.gif" /> <a href="#luahooktranslatename">LuaHookTranslateName</a></li>
65 <li><img alt="" src="../images/down.gif" /> <a href="#luahooktypechecker">LuaHookTypeChecker</a></li>
66 <li><img alt="" src="../images/down.gif" /> <a href="#luainherit">LuaInherit</a></li>
67 <li><img alt="" src="../images/down.gif" /> <a href="#luamaphandler">LuaMapHandler</a></li>
68 <li><img alt="" src="../images/down.gif" /> <a href="#luapackagecpath">LuaPackageCPath</a></li>
69 <li><img alt="" src="../images/down.gif" /> <a href="#luapackagepath">LuaPackagePath</a></li>
70 <li><img alt="" src="../images/down.gif" /> <a href="#luaquickhandler">LuaQuickHandler</a></li>
71 <li><img alt="" src="../images/down.gif" /> <a href="#luaroot">LuaRoot</a></li>
72 <li><img alt="" src="../images/down.gif" /> <a href="#luascope">LuaScope</a></li>
73 </ul>
74 <h3>Topics</h3>
75 <ul id="topics">
76 <li><img alt="" src="../images/down.gif" /> <a href="#basicconf">Basic Configuration</a></li>
77 <li><img alt="" src="../images/down.gif" /> <a href="#writinghandlers">Writing Handlers</a></li>
78 <li><img alt="" src="../images/down.gif" /> <a href="#writingauthzproviders">Writing Authorization Providers</a></li>
79 <li><img alt="" src="../images/down.gif" /> <a href="#writinghooks">Writing Hooks</a></li>
80 <li><img alt="" src="../images/down.gif" /> <a href="#datastructures">Data Structures</a></li>
81 <li><img alt="" src="../images/down.gif" /> <a href="#logging">Logging Functions</a></li>
82 <li><img alt="" src="../images/down.gif" /> <a href="#apache2">apache2 Package</a></li>
83 </ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
84 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
85 <div class="section">
86 <h2><a name="basicconf" id="basicconf">Basic Configuration</a></h2>
87
88 <p>The basic module loading directive is</p>
89
90 <pre class="prettyprint lang-config">
91     LoadModule lua_module modules/mod_lua.so
92 </pre>
93
94
95 <p>
96 <code>mod_lua</code> provides a handler named <code>lua-script</code>,
97 which can be used with an <code>AddHandler</code> directive:</p>
98
99 <pre class="prettyprint lang-config">
100 AddHandler lua-script .lua
101 </pre>
102
103
104 <p>
105 This will cause <code>mod_lua</code> to handle requests for files
106 ending in <code>.lua</code> by invoking that file's
107 <code>handle</code> function.
108 </p>
109
110 <p>For more flexibility, see <code class="directive">LuaMapHandler</code>.
111 </p>
112
113 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
114 <div class="section">
115 <h2><a name="writinghandlers" id="writinghandlers">Writing Handlers</a></h2>
116 <p> In the Apache HTTP Server API, the handler is a specific kind of hook
117 responsible for generating the response.  Examples of modules that include a
118 handler are <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>, <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>,
119 and <code class="module"><a href="../mod/mod_status.html">mod_status</a></code>.</p>
120
121 <p><code>mod_lua</code> always looks to invoke a Lua function for the handler, rather than
122 just evaluating a script body CGI style. A handler function looks
123 something like this:</p>
124
125
126 <pre class="prettyprint lang-lua">
127 <strong>example.lua</strong>
128 -- example handler
129
130 require "string"
131
132 --[[
133      This is the default method name for Lua handlers, see the optional
134      function-name in the LuaMapHandler directive to choose a different
135      entry point.
136 --]]
137 function handle(r)
138     r.content_type = "text/plain"
139     r:puts("Hello Lua World!\n")
140
141     if r.method == 'GET' then
142         for k, v in pairs( r:parseargs() ) do
143             r:puts( string.format("%s: %s\n", k, v) )
144         end
145     elseif r.method == 'POST' then
146         for k, v in pairs( r:parsebody() ) do
147             r:puts( string.format("%s: %s\n", k, v) )
148         end
149     else
150         r:puts("Unsupported HTTP method " .. r.method)
151     end
152 end
153 </pre>
154
155
156 <p>
157 This handler function just prints out the uri or form encoded
158 arguments to a plaintext page.
159 </p>
160
161 <p>
162 This means (and in fact encourages) that you can have multiple
163 handlers (or hooks, or filters) in the same script.
164 </p>
165
166 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
167 <div class="section">
168 <h2><a name="writingauthzproviders" id="writingauthzproviders">Writing Authorization Providers</a></h2>
169
170
171 <p><code class="module"><a href="../mod/mod_authz_core.html">mod_authz_core</a></code> provides a high-level interface to
172 authorization that is much easier to use than using into the relevant
173 hooks directly. The first argument to the
174 <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> directive gives
175 the name of the responsible authorization provider. For any
176 <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> line,
177 <code class="module"><a href="../mod/mod_authz_core.html">mod_authz_core</a></code> will call the authorization provider
178 of the given name, passing the rest of the line as parameters. The
179 provider will then check authorization and pass the result as return
180 value.</p>
181
182 <p>The authz provider is normally called before authentication. If it needs to
183 know the authenticated user name (or if the user will be authenticated at
184 all), the provider must return <code>apache2.AUTHZ_DENIED_NO_USER</code>.
185 This will cause authentication to proceed and the authz provider to be
186 called a second time.</p>
187
188 <p>The following authz provider function takes two arguments, one ip
189 address and one user name. It will allow access from the given ip address
190 without authentication, or if the authenticated user matches the second
191 argument:</p>
192
193 <pre class="prettyprint lang-lua">
194 <strong>authz_provider.lua</strong>
195
196 require 'apache2'
197
198 function authz_check_foo(r, ip, user)
199     if r.useragent_ip == ip then
200         return apache2.AUTHZ_GRANTED
201     elseif r.user == nil then
202         return apache2.AUTHZ_DENIED_NO_USER
203     elseif r.user == user then
204         return apache2.AUTHZ_GRANTED
205     else
206         return apache2.AUTHZ_DENIED
207     end
208 end
209 </pre>
210
211
212 <p>The following configuration registers this function as provider
213 <code>foo</code> and configures it for URL <code>/</code>:</p>
214 <pre class="prettyprint lang-config">
215 LuaAuthzProvider foo authz_provider.lua authz_check_foo
216 &lt;Location /&gt;
217   Require foo 10.1.2.3 john_doe
218 &lt;/Location&gt;
219 </pre>
220
221
222 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
223 <div class="section">
224 <h2><a name="writinghooks" id="writinghooks">Writing Hooks</a></h2>
225
226 <p>Hook functions are how modules (and Lua scripts) participate in the
227 processing of requests. Each type of hook exposed by the server exists for
228 a specific purposes such as mapping requests to the filesystem,
229 performing access control, or setting mimetypes.  General purpose hooks
230 that simply run at handy times in the request lifecycle exist as well.</p>
231
232 <p>Hook functions are passed the request object as their only argument.
233 They can return any value, depending on the hook, but most commonly
234 they'll return OK, DONE, or DECLINED, which you can write in lua as
235 <code>apache2.OK</code>, <code>apache2.DONE</code>, or
236 <code>apache2.DECLINED</code>, or else an HTTP status code.</p>
237
238 <pre class="prettyprint lang-lua">
239 <strong>translate_name.lua</strong>
240 -- example hook that rewrites the URI to a filesystem path.
241
242 require 'apache2'
243
244 function translate_name(r)
245     if r.uri == "/translate-name" then
246         r.filename = r.document_root .. "/find_me.txt"
247         return apache2.OK
248     end
249     -- we don't care about this URL, give another module a chance
250     return apache2.DECLINED
251 end
252 </pre>
253
254
255 <pre class="prettyprint lang-lua">
256 <strong>translate_name2.lua</strong>
257 --[[ example hook that rewrites one URI to another URI. It returns a
258      apache2.DECLINED to give other URL mappers a chance to work on the
259      substitution, including the core translate_name hook which maps based
260      on the DocumentRoot.
261
262      Note: It is currently undefined as to whether this runs before or after
263      mod_alias.
264 --]]
265
266 require 'apache2'
267
268 function translate_name(r)
269     if r.uri == "/translate-name" then
270         r.uri = "/find_me.txt"
271         return apache2.DECLINED
272     end
273     return apache2.DECLINED
274 end
275 </pre>
276
277 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
278 <div class="section">
279 <h2><a name="datastructures" id="datastructures">Data Structures</a></h2>
280
281 <dl>
282 <dt>request_rec</dt>
283         <dd>
284         <p>The request_rec is mapped in as a userdata. It has a metatable
285         which lets you do useful things with it. For the most part it
286         has the same fields as the request_rec struct (see httpd.h
287         until we get better docs here) many of which are writeable as
288         well as readable.  (The table fields' content can be changed, but the
289         fields themselves cannot be set to different tables.)</p>
290
291         <table class="bordered">
292
293         <tr>
294           <th><strong>Name</strong></th>
295           <th><strong>Lua type</strong></th>
296           <th><strong>Writable</strong></th>
297         </tr>
298         <tr>
299           <td><code>ap_auth_type</code></td>
300           <td>string</td>
301           <td>no</td>
302         </tr>
303         <tr>
304           <td><code>args</code></td>
305           <td>string</td>
306           <td>yes</td>
307         </tr>
308         <tr>
309           <td><code>assbackwards</code></td>
310           <td>boolean</td>
311           <td>no</td>
312         </tr>
313
314         <tr>
315           <td><code>canonical_filename</code></td>
316           <td>string</td>
317           <td>no</td>
318         </tr>
319         <tr>
320           <td><code>content_encoding</code></td>
321           <td>string</td>
322           <td>no</td>
323         </tr>
324         <tr>
325           <td><code>content_type</code></td>
326           <td>string</td>
327           <td>yes</td>
328         </tr>
329         <tr>
330           <td><code>context_prefix</code></td>
331           <td>string</td>
332           <td>no</td>
333         </tr>
334         <tr>
335           <td><code>context_document_root</code></td>
336           <td>string</td>
337           <td>no</td>
338         </tr>
339
340         <tr>
341           <td><code>document_root</code></td>
342           <td>string</td>
343           <td>no</td>
344         </tr>
345         <tr>
346           <td><code>err_headers_out</code></td>
347           <td>table</td>
348           <td>no</td>
349         </tr>
350         <tr>
351           <td><code>filename</code></td>
352           <td>string</td>
353           <td>yes</td>
354         </tr>
355         <tr>
356           <td><code>handler</code></td>
357           <td>string</td>
358           <td>yes</td>
359         </tr>
360
361         <tr>
362           <td><code>headers_in</code></td>
363           <td>table</td>
364           <td>yes</td>
365         </tr>
366         <tr>
367           <td><code>headers_out</code></td>
368           <td>table</td>
369           <td>yes</td>
370         </tr>
371         <tr>
372           <td><code>hostname</code></td>
373           <td>string</td>
374           <td>no</td>
375         </tr>
376         <tr>
377           <td><code>log_id</code></td>
378           <td>string</td>
379           <td>no</td>
380         </tr>
381         <tr>
382           <td><code>method</code></td>
383           <td>string</td>
384           <td>no</td>
385         </tr>
386         <tr>
387           <td><code>notes</code></td>
388           <td>table</td>
389           <td>yes</td>
390         </tr>
391         <tr>
392           <td><code>path_info</code></td>
393           <td>string</td>
394           <td>no</td>
395         </tr>
396         <tr>
397           <td><code>protocol</code></td>
398           <td>string</td>
399           <td>no</td>
400         </tr>
401         <tr>
402           <td><code>proxyreq</code></td>
403           <td>string</td>
404           <td>yes</td>
405         </tr>
406         <tr>
407           <td><code>range</code></td>
408           <td>string</td>
409           <td>no</td>
410         </tr>
411         <tr>
412           <td><code>subprocess_env</code></td>
413           <td>table</td>
414           <td>yes</td>
415         </tr>
416         <tr>
417           <td><code>status</code></td>
418           <td>number</td>
419           <td>yes</td>
420         </tr>
421         <tr>
422           <td><code>the_request</code></td>
423           <td>string</td>
424           <td>no</td>
425         </tr>
426         <tr>
427           <td><code>unparsed_uri</code></td>
428           <td>string</td>
429           <td>no</td>
430         </tr>
431         <tr>
432           <td><code>uri</code></td>
433           <td>string</td>
434           <td>yes</td>
435         </tr>
436         <tr>
437           <td><code>user</code></td>
438           <td>string</td>
439           <td>yes</td>
440         </tr>
441         <tr>
442           <td><code>useragent_ip</code></td>
443           <td>string</td>
444           <td>no</td>
445         </tr>
446         </table>
447
448         <p>The request_rec has (at least) the following methods:</p>
449
450         <pre class="prettyprint lang-lua">
451         r:addoutputfilter(name|function) -- add an output filter
452         </pre>
453
454
455         <pre class="prettyprint lang-lua">
456         r:parseargs() -- returns a Lua table containing the request's query string arguments
457         </pre>
458
459
460         <pre class="prettyprint lang-lua">
461         r:parsebody() -- parse any POST data in the request and return it as a Lua table
462         </pre>
463
464
465         <pre class="prettyprint lang-lua">
466         r:puts("hello", " world", "!") -- print to response body
467         </pre>
468
469
470         <pre class="prettyprint lang-lua">
471         r:write("a single string") -- print to response body
472         </pre>
473
474         </dd>
475     </dl>
476
477 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
478 <div class="section">
479 <h2><a name="logging" id="logging">Logging Functions</a></h2>
480
481 <pre class="prettyprint lang-lua">
482         -- examples of logging messages<br />
483         r:trace1("This is a trace log message") -- trace1 through trace8 can be used <br />
484         r:debug("This is a debug log message")<br />
485         r:info("This is an info log message")<br />
486         r:notice("This is an notice log message")<br />
487         r:warn("This is an warn log message")<br />
488         r:err("This is an err log message")<br />
489         r:alert("This is an alert log message")<br />
490         r:crit("This is an crit log message")<br />
491         r:emerg("This is an emerg log message")<br />
492 </pre>
493
494
495 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
496 <div class="section">
497 <h2><a name="apache2" id="apache2">apache2 Package</a></h2>
498 <p>A package named <code>apache2</code> is available with (at least) the following contents.</p>
499 <dl>
500   <dt>apache2.OK</dt>
501   <dd>internal constant OK.  Handlers should return this if they've
502   handled the request.</dd>
503   <dt>apache2.DECLINED</dt>
504   <dd>internal constant DECLINED.  Handlers should return this if
505   they are not going to handle the request.</dd>
506   <dt>apache2.DONE</dt>
507   <dd>internal constant DONE.</dd>
508   <dt>apache2.version</dt>
509   <dd>Apache HTTP server version string</dd>
510   <dt>apache2.HTTP_MOVED_TEMPORARILY</dt>
511   <dd>HTTP status code</dd>
512   <dt>apache2.PROXYREQ_NONE, apache2.PROXYREQ_PROXY, apache2.PROXYREQ_REVERSE, apache2.PROXYREQ_RESPONSE</dt>
513   <dd>internal constants used by <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code></dd>
514 </dl>
515 <p>(Other HTTP status codes are not yet implemented.)</p>
516 </div>
517 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
518 <div class="directive-section"><h2><a name="LuaAuthzProvider" id="LuaAuthzProvider">LuaAuthzProvider</a> <a name="luaauthzprovider" id="luaauthzprovider">Directive</a></h2>
519 <table class="directive">
520 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Plug an authorization provider function into <code class="module"><a href="../mod/mod_authz_core.html">mod_authz_core</a></code>
521 </td></tr>
522 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LuaAuthzProvider provider_name /path/to/lua/script.lua function_name</code></td></tr>
523 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
524 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
525 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
526 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.5.0 and later</td></tr>
527 </table>
528 <p>After a lua function has been registered as authorization provider, it can be used
529 with the <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> directive:</p>
530
531 <div class="example"><pre class="prettyprint lang-config">
532 LuaRoot /usr/local/apache2/lua
533 LuaAuthzProvider foo authz.lua authz_check_foo
534 &lt;Location /&gt;
535   Require foo bar
536 &lt;/Location&gt;
537 </pre>
538 </div>
539
540
541 </div>
542 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
543 <div class="directive-section"><h2><a name="LuaCodeCache" id="LuaCodeCache">LuaCodeCache</a> <a name="luacodecache" id="luacodecache">Directive</a></h2>
544 <table class="directive">
545 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configure the compiled code cache.</td></tr>
546 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LuaCodeCache stat|forever|never</code></td></tr>
547 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LuaCodeCache stat</code></td></tr>
548 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
549 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
550 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
551 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
552 </table><p>
553     Specify the behavior of the in-memory code cache. The default
554     is stat, which stats the top level script (not any included
555     ones) each time that file is needed, and reloads it if the
556     modified time indicates it is newer than the one it has
557     already loaded. The other values cause it to keep the file
558     cached forever (don't stat and replace) or to never cache the
559     file.</p>
560
561     <p>In general stat or forever is good for production, and stat or never
562     for development.</p>
563
564     <div class="example"><h3>Examples:</h3><pre class="prettyprint lang-config">
565 LuaCodeCache stat
566 LuaCodeCache forever
567 LuaCodeCache never
568     </pre>
569 </div>
570
571
572 </div>
573 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
574 <div class="directive-section"><h2><a name="LuaHookAccessChecker" id="LuaHookAccessChecker">LuaHookAccessChecker</a> <a name="luahookaccesschecker" id="luahookaccesschecker">Directive</a></h2>
575 <table class="directive">
576 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Provide a hook for the access_checker phase of request processing</td></tr>
577 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LuaHookAccessChecker  /path/to/lua/script.lua  hook_function_name [early|late]</code></td></tr>
578 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
579 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
580 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
581 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
582 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>The optional third argument is supported in 2.3.15 and later</td></tr>
583 </table>
584 <p>Add your hook to the access_checker phase.  An access checker
585 hook function usually returns OK, DECLINED, or HTTP_FORBIDDEN.</p>
586    <div class="note"><h3>Ordering</h3><p>The optional arguments "early" or "late" 
587    control when this script runs relative to other modules.</p></div>
588
589 </div>
590 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
591 <div class="directive-section"><h2><a name="LuaHookAuthChecker" id="LuaHookAuthChecker">LuaHookAuthChecker</a> <a name="luahookauthchecker" id="luahookauthchecker">Directive</a></h2>
592 <table class="directive">
593 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Provide a hook for the auth_checker phase of request processing</td></tr>
594 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LuaHookAuthChecker  /path/to/lua/script.lua hook_function_name [early|late]</code></td></tr>
595 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
596 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
597 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
598 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
599 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>The optional third argument is supported in 2.3.15 and later</td></tr>
600 </table>
601 <p>Invoke a lua function in the auth_checker phase of processing
602 a request.  This can be used to implement arbitrary authentication
603 and authorization checking.  A very simple example:
604 </p>
605 <pre class="prettyprint lang-lua">
606 require 'apache2'
607
608 -- fake authcheck hook
609 -- If request has no auth info, set the response header and
610 -- return a 401 to ask the browser for basic auth info.
611 -- If request has auth info, don't actually look at it, just
612 -- pretend we got userid 'foo' and validated it.
613 -- Then check if the userid is 'foo' and accept the request.
614 function authcheck_hook(r)
615
616    -- look for auth info
617    auth = r.headers_in['Authorization']
618    if auth ~= nil then
619      -- fake the user
620      r.user = 'foo'
621    end
622
623    if r.user == nil then
624       r:debug("authcheck: user is nil, returning 401")
625       r.err_headers_out['WWW-Authenticate'] = 'Basic realm="WallyWorld"'
626       return 401
627    elseif r.user == "foo" then
628       r:debug('user foo: OK')
629    else
630       r:debug("authcheck: user='" .. r.user .. "'")
631       r.err_headers_out['WWW-Authenticate'] = 'Basic realm="WallyWorld"'
632       return 401
633    end
634    return apache2.OK
635 end
636 </pre>
637
638    <div class="note"><h3>Ordering</h3><p>The optional arguments "early" or "late" 
639    control when this script runs relative to other modules.</p></div>
640
641 </div>
642 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
643 <div class="directive-section"><h2><a name="LuaHookCheckUserID" id="LuaHookCheckUserID">LuaHookCheckUserID</a> <a name="luahookcheckuserid" id="luahookcheckuserid">Directive</a></h2>
644 <table class="directive">
645 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Provide a hook for the check_user_id phase of request processing</td></tr>
646 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LuaHookCheckUserID  /path/to/lua/script.lua hook_function_name [early|late]</code></td></tr>
647 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
648 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
649 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
650 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
651 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>The optional third argument is supported in 2.3.15 and later</td></tr>
652 </table><p>...</p>
653    <div class="note"><h3>Ordering</h3><p>The optional arguments "early" or "late" 
654    control when this script runs relative to other modules.</p></div>
655
656 </div>
657 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
658 <div class="directive-section"><h2><a name="LuaHookFixups" id="LuaHookFixups">LuaHookFixups</a> <a name="luahookfixups" id="luahookfixups">Directive</a></h2>
659 <table class="directive">
660 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Provide a hook for the fixups phase of request
661 processing</td></tr>
662 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LuaHookFixups  /path/to/lua/script.lua hook_function_name</code></td></tr>
663 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
664 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
665 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
666 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
667 </table>
668 <p>
669     Just like LuaHookTranslateName, but executed at the fixups phase
670 </p>
671
672 </div>
673 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
674 <div class="directive-section"><h2><a name="LuaHookInsertFilter" id="LuaHookInsertFilter">LuaHookInsertFilter</a> <a name="luahookinsertfilter" id="luahookinsertfilter">Directive</a></h2>
675 <table class="directive">
676 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Provide a hook for the insert_filter phase of request processing</td></tr>
677 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LuaHookInsertFilter  /path/to/lua/script.lua hook_function_name</code></td></tr>
678 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
679 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
680 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
681 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
682 </table><p>Not Yet Implemented</p>
683 </div>
684 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
685 <div class="directive-section"><h2><a name="LuaHookMapToStorage" id="LuaHookMapToStorage">LuaHookMapToStorage</a> <a name="luahookmaptostorage" id="luahookmaptostorage">Directive</a></h2>
686 <table class="directive">
687 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Provide a hook for the map_to_storage phase of request processing</td></tr>
688 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LuaHookMapToStorage  /path/to/lua/script.lua hook_function_name</code></td></tr>
689 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
690 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
691 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
692 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
693 </table><p>...</p>
694 </div>
695 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
696 <div class="directive-section"><h2><a name="LuaHookTranslateName" id="LuaHookTranslateName">LuaHookTranslateName</a> <a name="luahooktranslatename" id="luahooktranslatename">Directive</a></h2>
697 <table class="directive">
698 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Provide a hook for the translate name phase of request processing</td></tr>
699 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LuaHookTranslateName  /path/to/lua/script.lua  hook_function_name [early|late]</code></td></tr>
700 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
701 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
702 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
703 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
704 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>The optional third argument is supported in 2.3.15 and later</td></tr>
705 </table><p>
706     Add a hook (at APR_HOOK_MIDDLE) to the translate name phase of
707     request processing. The hook function receives a single
708     argument, the request_rec, and should return a status code,
709     which is either an HTTP error code, or the constants defined
710     in the apache2 module: apache2.OK, apache2.DECLINED, or
711     apache2.DONE. </p>
712
713     <p>For those new to hooks, basically each hook will be invoked
714     until one of them returns apache2.OK. If your hook doesn't
715     want to do the translation it should just return
716     apache2.DECLINED. If the request should stop processing, then
717     return apache2.DONE.</p>
718
719     <p>Example:</p>
720
721 <pre class="prettyprint lang-config">
722 # httpd.conf
723 LuaHookTranslateName /scripts/conf/hooks.lua silly_mapper
724 </pre>
725
726
727 <pre class="prettyprint lang-lua">
728 -- /scripts/conf/hooks.lua --
729 require "apache2"
730 function silly_mapper(r)
731     if r.uri == "/" then
732         r.filename = "/var/www/home.lua"
733         return apache2.OK
734     else
735         return apache2.DECLINED
736     end
737 end
738 </pre>
739
740
741    <div class="note"><h3>Context</h3><p>This directive is not valid in <code class="directive"><a href="../mod/core.html#directory">&lt;Directory&gt;</a></code>, <code class="directive"><a href="../mod/core.html#files">&lt;Files&gt;</a></code>, or htaccess
742    context.</p></div>
743
744    <div class="note"><h3>Ordering</h3><p>The optional arguments "early" or "late" 
745    control when this script runs relative to other modules.</p></div>
746
747
748 </div>
749 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
750 <div class="directive-section"><h2><a name="LuaHookTypeChecker" id="LuaHookTypeChecker">LuaHookTypeChecker</a> <a name="luahooktypechecker" id="luahooktypechecker">Directive</a></h2>
751 <table class="directive">
752 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Provide a hook for the type_checker phase of request processing</td></tr>
753 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LuaHookTypeChecker  /path/to/lua/script.lua hook_function_name</code></td></tr>
754 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
755 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
756 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
757 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
758 </table><p>...</p>
759 </div>
760 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
761 <div class="directive-section"><h2><a name="LuaInherit" id="LuaInherit">LuaInherit</a> <a name="luainherit" id="luainherit">Directive</a></h2>
762 <table class="directive">
763 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Controls how parent configuration sections are merged into children</td></tr>
764 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LuaInherit none|parent-first|parent-last</code></td></tr>
765 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LuaInherit parent-first</code></td></tr>
766 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
767 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
768 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
769 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
770 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.4.0 and later</td></tr>
771 </table><p>By default, if LuaHook* directives are used in overlapping
772     Directory or Location configuration sections, the scripts defined in the
773     more specific section are run <em>after</em> those defined in the more
774     generic section (LuaInherit parent-first).  You can reverse this order, or
775     make the parent context not apply at all.</p>
776     
777     <p> In previous 2.3.x releases, the default was effectively to ignore LuaHook*
778     directives from parent configuration sections.</p>
779 </div>
780 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
781 <div class="directive-section"><h2><a name="LuaMapHandler" id="LuaMapHandler">LuaMapHandler</a> <a name="luamaphandler" id="luamaphandler">Directive</a></h2>
782 <table class="directive">
783 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Map a path to a lua handler</td></tr>
784 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LuaMapHandler uri-pattern /path/to/lua/script.lua [function-name]</code></td></tr>
785 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
786 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
787 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
788 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
789 </table>
790     <p>This directive matches a uri pattern to invoke a specific
791     handler function in a specific file. It uses PCRE regular
792     expressions to match the uri, and supports interpolating
793     match groups into both the file path and the function name
794     be careful writing your regular expressions to avoid security
795     issues.</p>
796    <div class="example"><h3>Examples:</h3><pre class="prettyprint lang-config">
797     LuaMapHandler /(\w+)/(\w+) /scripts/$1.lua handle_$2
798     </pre>
799 </div>
800         <p>This would match uri's such as /photos/show?id=9
801         to the file /scripts/photos.lua and invoke the
802         handler function handle_show on the lua vm after
803         loading that file.</p>
804
805 <pre class="prettyprint lang-config">
806     LuaMapHandler /bingo /scripts/wombat.lua
807 </pre>
808
809         <p>This would invoke the "handle" function, which
810         is the default if no specific function name is
811         provided.</p>
812
813 </div>
814 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
815 <div class="directive-section"><h2><a name="LuaPackageCPath" id="LuaPackageCPath">LuaPackageCPath</a> <a name="luapackagecpath" id="luapackagecpath">Directive</a></h2>
816 <table class="directive">
817 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Add a directory to lua's package.cpath</td></tr>
818 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LuaPackageCPath /path/to/include/?.soa</code></td></tr>
819 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
820 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
821 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
822 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
823 </table>
824     <p>Add a path to lua's shared library search path. Follows the same
825     conventions as lua. This just munges the package.cpath in the
826     lua vms.</p>
827
828
829 </div>
830 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
831 <div class="directive-section"><h2><a name="LuaPackagePath" id="LuaPackagePath">LuaPackagePath</a> <a name="luapackagepath" id="luapackagepath">Directive</a></h2>
832 <table class="directive">
833 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Add a directory to lua's package.path</td></tr>
834 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LuaPackagePath /path/to/include/?.lua</code></td></tr>
835 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
836 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
837 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
838 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
839 </table><p>Add a path to lua's module search path. Follows the same
840     conventions as lua. This just munges the package.path in the
841     lua vms.</p>
842
843     <div class="example"><h3>Examples:</h3><pre class="prettyprint lang-config">
844 LuaPackagePath /scripts/lib/?.lua
845 LuaPackagePath /scripts/lib/?/init.lua
846     </pre>
847 </div>
848
849 </div>
850 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
851 <div class="directive-section"><h2><a name="LuaQuickHandler" id="LuaQuickHandler">LuaQuickHandler</a> <a name="luaquickhandler" id="luaquickhandler">Directive</a></h2>
852 <table class="directive">
853 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Provide a hook for the quick handler of request processing</td></tr>
854 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code /></td></tr>
855 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
856 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
857 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
858 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
859 </table><p>...</p>
860    <div class="note"><h3>Context</h3><p>This directive is not valid in <code class="directive"><a href="../mod/core.html#directory">&lt;Directory&gt;</a></code>, <code class="directive"><a href="../mod/core.html#files">&lt;Files&gt;</a></code>, or htaccess
861    context.</p></div>
862
863 </div>
864 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
865 <div class="directive-section"><h2><a name="LuaRoot" id="LuaRoot">LuaRoot</a> <a name="luaroot" id="luaroot">Directive</a></h2>
866 <table class="directive">
867 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Specify the base path for resolving relative paths for mod_lua directives</td></tr>
868 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LuaRoot /path/to/a/directory</code></td></tr>
869 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
870 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
871 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
872 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
873 </table>
874     <p>Specify the base path which will be used to evaluate all
875     relative paths within mod_lua. If not specified they
876     will be resolved relative to the current working directory,
877     which may not always work well for a server.</p>
878
879 </div>
880 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
881 <div class="directive-section"><h2><a name="LuaScope" id="LuaScope">LuaScope</a> <a name="luascope" id="luascope">Directive</a></h2>
882 <table class="directive">
883 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>One of once, request, conn, server -- default is once</td></tr>
884 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LuaScope once|request|conn|server [max|min max]</code></td></tr>
885 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LuaScope once</code></td></tr>
886 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
887 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
888 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
889 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
890 </table>
891     <p>Specify the lifecycle scope of the Lua interpreter which will
892     be used by handlers in this "Directory." The default is "once"</p>
893
894    <dl>
895     <dt>once:</dt> <dd>use the interpreter once and throw it away.</dd>
896
897     <dt>request:</dt> <dd>use the interpreter to handle anything based on
898              the same file within this request, which is also
899              request scoped.</dd>
900
901     <dt>conn:</dt> <dd>Same as request but attached to the connection_rec</dd>
902
903     <dt>server:</dt>  <dd>This one is different than others because the
904             server scope is quite long lived, and multiple threads
905             will have the same server_rec. To accommodate this
906             server scoped interpreter are stored in an apr
907             resource list. The min and max arguments are intended
908             to specify the pool size, but are unused at this time.</dd>
909    </dl>
910
911 </div>
912 </div>
913 <div class="bottomlang">
914 <p><span>Available Languages: </span><a href="../en/mod/mod_lua.html" title="English">&nbsp;en&nbsp;</a> |
915 <a href="../fr/mod/mod_lua.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a></p>
916 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
917 <script type="text/javascript"><!--//--><![CDATA[//><!--
918 var comments_shortname = 'httpd';
919 var comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/mod_lua.html';
920 (function(w, d) {
921     if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
922         d.write('<div id="comments_thread"><\/div>');
923         var s = d.createElement('script');
924         s.type = 'text/javascript';
925         s.async = true;
926         s.src = 'https://c.apaste.info/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
927         (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
928     }
929     else {
930         d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
931     }
932 })(window, document);
933 //--><!]]></script></div><div id="footer">
934 <p class="apache">Copyright 2012 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
935 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
936 if (typeof(prettyPrint) !== 'undefined') {
937     prettyPrint();
938 }
939 //--><!]]></script>
940 </body></html>