bozohttpd(3lua) - NetBSD Manual Pages

Command: Section: Arch: Collection:  
BOZOHTTPD(3lua)                      LOCAL                     BOZOHTTPD(3lua)

bozohttpd -- provides access to libbozohttpd(3) functionality from Lua
local bozo = require 'bozohttpd' instance = bozo.init_httpd(instance) prefs = bozo.init_prefs() bozo.set_pref(instance, prefs, name, value) bozo.get_pref(prefs, name) bozo.setup(instance, prefs, host, root) bozo.dynamic_mime(instance, one, two, three, four) bozo.ssl_set_opts(instance, one, two) bozo.cgi_setbin(instance, bin) bozo.cgi_map(instance, 1, 2) req = bozo.read_request(instance) bozo.process_request(req) bozo.clean_request(req)
The bozohttpd Lua binding provides access to functionality available in libbozohttpd(3).
The following example code demonstrates the process of instantiating an instance of bozohttpd as a background daemon. The instance is set to serve files from /var/www for the hostname on TCP port 8080. local bozo = require 'bozohttpd' myhttpd = bozo.init_httpd(myhttpd) prefs = bozo.init_prefs() bozo.set_pref(myhttpd, prefs, "port number", "8080") bozo.set_pref(myhttpd, prefs, "background", 1) bozo.setup(myhttpd, prefs, "", "/var/www") req = bozo.read_request(myhttpd) bozo.process_request(req) bozo.clean_request(req)
lua(1), luac(1), libbozohttpd(3), intro(3lua)
bozohttpd Lua binding first appeared in NetBSD 9.0.
The bozohttpd Lua binding was written by Alistair Crooks <>. This manual was written by Sevan Janiyan <>.
This manual needs more description of the available functionality. NetBSD 9.3 May 6, 2018 NetBSD 9.3
Powered by man-cgi (2024-03-20). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.