3

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).

hjpotter92
  • 78,589
  • 36
  • 144
  • 183
jsmdnq
  • 363
  • 2
  • 10

3 Answers3

1

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.

P.S.

I haven't worked with it, so I'm not eaxctly sure if it works.

Community
  • 1
  • 1
hjpotter92
  • 78,589
  • 36
  • 144
  • 183
1

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 :)

Daniel Gruno
  • 111
  • 1
-1

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).

Martin Müller
  • 2,565
  • 21
  • 32