mod_plua  0.54-src
About: mod_pLua is an Apache httpd 2.x module for running preprocessed (HTML-embedded) Lua scripts with a PHP-like syntax.
  Fossies Dox: mod_plua_0.54-src.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

mod_plua Documentation

Some Fossies usage hints in advance:

  1. To see the Doxygen generated documentation please click on one of the items in the steelblue colored "quick index" bar above or use the side panel at the left which displays a hierarchical tree-like index structure and is adjustable in width.
  2. If you want to search for something by keyword rather than browse for it you can use the client side search facility (using Javascript and DHTML) that provides live searching, i.e. the search results are presented and adapted as you type in the Search input field at the top right.
  3. Doxygen doesn't incorporate all member files but just a definable subset (basically the main project source code files that are written in a supported language). So to search and browse all member files you may visit the Fossies mod_plua_0.54-src.tar.gz contents page and use the Fossies standard member browsing features (also with source code highlighting and additionally with optional code folding).
README.md

mod_pLua

mod_pLua is an Apache HTTP Server 2.x module for developing web applications with Lua. With mod_pLua, you can use Lua for scripting in two distinct ways:

Embedded Lua scripting:

<html>
    <body>
        <?
          get = parseGet(); --# Parse any GET data passed on to us.
          name = get['name'] or "unknown person";
          x = (x or 0) + 1; --# Increment a persistent, global variable x.
        ?>
        <h1>Hello, <?=name?>!</h1>
        <?if (x > 3) then?>
            X is > 3!
        <?end?>
    </body>
</html>

Plain Lua scripting:

setContentType("text/html");
local vars = parseGet();
local user = vars["name"] or "unknown person";
print("Hello, ", user);

(This example can be achieved using the pLuaRaw directive)

Additional features

mod_pLua precompiles all scripts and caches the compiled binary code so that each new call to the same file will be lightning fast, allowing you to serve hundreds of thousands of requests per minute on any modern server.

Mod_pLua supports both the traditional Lua interpreter as well as LuaJIT for both Windows and UNIX platforms. If your web server supports it, mod_pLua also utilizes APR_DBD and mod_dbd to handle databases through the dbopen() Lua function. And last, but not least, mod_pLua is of course thread-safe.