httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Dumpleton <graham.dumple...@gmail.com>
Subject Re: Some ramblings on httpd config
Date Fri, 05 Jun 2009 00:27:42 GMT
2009/6/4 Akins, Brian <Brian.Akins@turner.com>:
> On 6/4/09 8:14 AM, "Jorge Schrauwen" <jorge.schrauwen@gmail.com> wrote:
>
>> Like Graham mentioned mod_macro can be of some use here. however since
>> I'm looping in  perl I may as well push the 4 lines needed to httpd
>> instead of a one line macro replacemen.
>
> Okay, I'm not explaining my self well.  I'm not just talking about
> generating the internal configuration from lua (or xml, or macro, etc.)
>
> But actually "running" httpd using lua.  The request handling is done in lua
> - or rather driven by lua.
>
> See http://redmine.lighttpd.net/projects/lighttpd/wiki/AbsoLUAtion
>
> A side note: I think the vhost concept we have now is lacking.  The
> separation that we have just isn't necessary and makes some common tasks
> hard.  I'm not really willing to fight for this one though ;)  I can "fake"
> what I want if I can just load up a lua handler to handle the request from
> post_read to handler.

Since you are talking here about runtime decisions based on a specific
request, rather than auto generation of the static configuration in
once off phase, it almost sounds like all you need is a way of having
the lua code which would be associated with a specific handler in the
configuration file rather than having to be in a separate file. So,
instead of:

LuaHookTranslateName lib/hooks.lua trans_name

allowing something like:

  <LuaHookTranslateName trans_name>
  function trans_name(r)
     ...
  end
  </LuaHookTranslateName>

This approach doesn't require any changes to httpd itself as the
ability to do this becomes a feature of just the module supporting
that scripting language, eg, mod_lua. The same could also be done for
other scripting languages.

So, if your aim is to be able to do everything within the one Apache
configuration file, rather than out in separate scripts, this would
seem in part to satisfy the requirement.

Graham

Mime
View raw message