Reputation: 363
Apache has mod_lua
. Is there a way to have it process an html page with a like tag similar to php?
If not is there some other method? (I've seen mod_plua
but it doesn't seem to have much work towards it).
Upvotes: 3
Views: 789
Reputation: 111
For php-style Lua programming, you could definitely use mod_pLua. Contrary to what your initial statement says, it does have a lot of work put into it, just look at the extra features supported by it. Whether or not mod_lua will support this kind of programming in the future...who knows :)
Upvotes: 1
Reputation: 80629
I haven't tried it actually, but Haserl is something what you might need.
It was reported to be working in the lua-users mailing list.
Haserl is a small cgi wrapper that allows "PHP" style cgi programming, but uses a UNIX bash-like shell or Lua as the programming language. It is very small, so it can be used in embedded environments, or where something like PHP is too big.
I haven't worked with it, so I'm not eaxctly sure if it works.
Upvotes: 1
Reputation: 2535
You need to update your config. In your Apache config, add the following lines of code:
AddHandler lua-script .lua
AddHandler lua-script .htm .html
That should set the handler for html files to mod_lua (not tested as I don't use this mod).
Upvotes: -1