Brian's Waste of Time

Thu, 12 Oct 2006

Apache HTTPD Config

So I have been stealing spare moments to hack up apache+lua stuff here at ApacheCon and I'm adding config stuff now, so I wanted to strip down the httpd.conf to keep it sane. As a lot of people complain that apache's config files are... verbose I had to post the one I am running on right now ;-)

ServerRoot "/Users/brianm/.opt/httpd-2.2.3-worker-for-lua"
Listen 8000

LoadModule apreq_module modules/
LoadModule wombat_module modules/

Alias /testy /Users/brianm/src/wombat/htdocs/test.lua
AddHandler lua-script /Users/brianm/src/wombat/htdocs/test.lua

LuaPackagePath /Users/brianm/src/wombat/test/lib/?.lua
LuaPackagePath /Users/brianm/src/wombat/test/lib/?/init.lua
LuaPackagePath /Users/brianm/src/wombat/test/lib/?.so

That's it, and of the nine lines, the two LoadModule lines are for loading mod_wombat (my lua fun) and libapreq which it uses for parsing request stuff. Three of the lines are for adding paths to lua's package.path search path (equivalent of $: or CLASSPATH), one is for creating an alias and specifying the handler for my test script.


0 writebacks [/src/wombat] permanent link