first script for mod_lua apache2.3/2.4

function handle(r)
	r.content_type = "text/html"
	--r.headers_out["X-Powered-By"] = "mod_lua; " .. _VERSION
	r:puts("Hi!")
	return apache2.OK
end

Mod lua expects a function with the name handle() else there is a 500 Error. The error handling is pretty anoying…

Leave a Reply

Your email address will not be published. Required fields are marked *